Conversation
WalkthroughAdds a new GitHub Actions workflow that triggers on pull_request events targeting the dev branch and runs secret-detection and code-scanning jobs using shared workflow definitions from the prisma repository. Changes
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
♻️ Duplicate comments (2)
.github/workflows/pr-code-security.yml (2)
10-10:⚠️ Potential issue | 🟠 MajorPin reusable workflow to a specific commit SHA.
Referencing
@mainexposes this workflow to supply chain attacks—if the upstream repository is compromised, malicious code could execute in your CI. Pin to a specific commit SHA instead.🔒 Example fix
- uses: prisma/.github/.github/workflows/secret_detection.yml@main + uses: prisma/.github/.github/workflows/secret_detection.yml@<commit-sha>Replace
<commit-sha>with the actual SHA of the trusted commit.
,
12-14:⚠️ Potential issue | 🟠 MajorMissing
secrets: inheritand should pin to commit SHA.
- The PR description states both jobs use
secrets: inherit, but this job is missing it. If the code-scanning workflow requires secrets (e.g., for SARIF upload), it will fail.- Pin to a commit SHA instead of
@main(same supply chain concern as secret-detection job).🛠️ Proposed fix
code-scanning: name: Code Scanning - uses: prisma/.github/.github/workflows/code_scanning.yml@main + uses: prisma/.github/.github/workflows/code_scanning.yml@<commit-sha> + secrets: inherit,
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: d111fc2e-b16f-46e3-944a-0659005f6d86
📒 Files selected for processing (1)
.github/workflows/pr-code-security.yml
Summary
Adds a GitHub Actions workflow that runs on every pull request targeting the default branch:
prisma/.githubprisma/.githubBoth workflows are maintained centrally in
prisma/.githuband invoked viauses:withsecrets: inherit.Why
Ensures all PRs are scanned for leaked secrets and code security issues before merge.
Summary by CodeRabbit