-
Notifications
You must be signed in to change notification settings - Fork 2
fix(semgrep): run the package-manager scan on Depot everywhere #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
posthog
wants to merge
1
commit into
main
Choose a base branch
from
posthog-self-driving/cisemgrep-run-the-package-manager-scan-c85cb1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depot is not enabled for every public repository
Why we think it's a valid issue
semgrep.yml, a repo-wide grep fordepot,CLAUDE.md, and the git history of both semgrep workflows..github/workflows/semgrep.yml:20still carries the identical${{ github.event.repository.private && 'depot-ubuntu-latest' || 'ubuntu-latest' }}expression, and the PR does not touch it. The conditional is therefore a deliberate, repeated pattern in this repo, not a one-off leftover. Its sibling comment atsemgrep.yml:16repeats the same reason..github/workflows/semgrep-package-managers.yml:16-19records the constraint as a statement of fact, not as a guess. The PR removes the guard and the reason together. The PR body weighs only the cost trade-off (paid Depot minutes against free GitHub minutes). It gives no evidence that Depot access now covers every public repo.on: pull_requestandmerge_groupwith noworkflow_calltrigger, so it runs org-wide as a required workflow against each target repo. Commit 9c9ec54 confirms this failure mode is real: it describes an unrelated exit code that "reds this required check in whichever repo it ran against".timeout-minutes: 15at line 21 does not limit this risk. That budget counts run time after a runner picks the job up. It does not count queue time. A job whoseruns-onlabel matches no available runner stays queued until GitHub cancels it, roughly 24 hours later.Issue description
The removed comment states that some public repositories cannot use Depot. Those repositories will not find a runner with this label. Their required check can remain queued and block merges.
Suggested fix
Grant the Depot runner group access to every target repository before this change merges. If that is not possible, keep the existing fallback for repositories without Depot access.
Prompt to fix with AI (copy-paste)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a real risk worth resolving before merge, but it needs a human decision rather than an automated fix.
The change pins the job to
depot-ubuntu-latestunconditionally. Because this workflow runs org-wide as a required check (it triggers onpull_requestandmerge_groupwith noworkflow_call), any target repo whose runner set does not include a Depot runner will never find a match for that label.timeout-minutes: 15does not help — it only counts run time once a runner picks up the job, not queue time, so such a job stays queued until GitHub cancels it (~24h) and blocks merges the whole time. The blast radius is every affected repo at once.The premise looks solid: the sibling workflow
.github/workflows/semgrep.ymlstill uses the same${{ github.event.repository.private && 'depot-ubuntu-latest' || 'ubuntu-latest' }}fallback, and its comment there states outright that not every public repo has Depot enabled. This PR removed that guard and its explaining comment without evidence that Depot coverage now spans every public repo.What a human needs to decide: confirm the Depot runner group grants access to every target/public repo in the org — if so, the hardcoded label is safe (and
semgrep.ymlshould arguably be updated the same way for consistency); if not, keep the fallback expression here assemgrep.ymlstill does. I can't verify Depot org coverage from the code, and this is a CI/workflow file, so I'm not making the change unattended.