chore(ci): reduce Semgrep findings (Dependabot cooldown + pin actions)#6718
Merged
Conversation
Semgrep's dependabot-missing-cooldown flags every package-ecosystem entry that proposes updates immediately on publish, a supply-chain risk: a freshly published (possibly compromised) version is picked up with no soak time. Add a cooldown of default-days: 7 to each of the 12 entries.
Semgrep's github-actions-mutable-action-tag flags every action referenced by a mutable tag (e.g. @v7): a tag can be force-moved to point at malicious code after review. Pin all 61 remaining references to the commit SHA the tag currently resolves to, with a # <tag> comment so Dependabot keeps them updated. Reuses the SHAs already pinned elsewhere in the repo for the same action versions; the rest were resolved via the GitHub API.
|
Claude finished @otavio's task in 4m 7s —— View job Code Review CompleteReviewed 14 files across code quality, security, testing, language patterns, and architecture — no new issues found. The code looks good as-is. For a mechanical pin-and-cooldown PR the risk surface is narrow, so I verified the things that actually matter here:
The scoping note in the PR body is accurate — the remaining Semgrep findings (Dockerfile To request another review round, comment |
Pinning the actions in this file shifted the lines around the existing pull-request-target-code-checkout finding, so Semgrep's PR baseline-diff re-fingerprinted it as newly introduced and blocked the PR. The finding was reviewed, hardened, and documented in #6711: the pattern is required (the private-module go mod tidy needs secrets.PAT alongside the PR branch) and is gated to dependabot-authored PRs. Add a scoped nosemgrep recording it as an accepted, justified true positive.
otavio
force-pushed
the
security/reduce-semgrep-findings
branch
from
July 23, 2026 00:55
c032245 to
997c51a
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
First tranche of the Semgrep full-scan cleanup on
master— the two safe,mechanical, behavior-preserving buckets. Takes the full-scan findings from
127 → 54 (locally verified with the same
semgrep/semgrep:1.154.0imageand
p/golang p/dockerfile p/ciconfigs).1. Dependabot cooldown (
dependabot-missing-cooldown, 12 findings)Added
cooldown: { default-days: 7 }to all 12package-ecosystementries in.github/dependabot.yml. A freshly published (possibly compromised) version nowsoaks for 7 days before Dependabot proposes it — the classic window for a
supply-chain attack to be caught and yanked. Pure scheduling policy; no runtime
effect.
2. Pin GitHub Actions to commit SHAs (
github-actions-mutable-action-tag, 61 findings)Pinned all 61 remaining mutable-tag action references (e.g.
@v7) to the commitSHA the tag currently resolves to, each with a
# <tag>comment so Dependabotkeeps them updated. A mutable tag can be force-moved to malicious code after
review; a SHA can't.
latest patch; I verified all 24 distinct actions are pinned to the SHA of
their current release. This is a pure pin, not an upgrade.
the remaining 9 via the GitHub API.
Verification
new findings introduced.
Scope / not included
The remaining 54 findings need code judgment rather than a mechanical sweep and
are intentionally left for follow-ups: Dockerfile
USERhardening (12, ERROR,runtime-risky),
avoid-ssh-insecure-ignore-host-key(31, likely intentional foran SSH gateway/tests), and a handful of one-off code-level rules (math/rand,
websocket origin, TLS, deserialization, bind-all). The full-scan check will stay
red until those are triaged.