Commit e8ff791
chore(deps): Dependabot digest rotation for pinned Semgrep image [DEVA11Y-476] (#38)
* chore(deps): add Dependabot to rotate the pinned Semgrep CI image (DEVA11Y-476)
The Semgrep workflow container image is already pinned by immutable @sha256
digest (PR #15), which is the DEVA11Y-476 chain-breaker for the C-001 chain
(DEVA11Y-485: CI image compromise -> mutable main -> SPM plugin RCE). A static
digest, however, never receives upstream security patches — the current pin
already lags returntocorp/semgrep:latest.
Add .github/dependabot.yml with a `docker` ecosystem entry over
/.github/workflows so Dependabot bumps the pinned digest to the newest build on
a weekly cadence, keeping immutability without freezing the image.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore(ci): add cooldown to Dependabot Semgrep image updates
Adds a release-age cooldown so Dependabot does not adopt a freshly-published
returntocorp/semgrep digest immediately — a poisoned-image would otherwise be
pulled in within a day of publication, the exact window digest-pinning is meant
to defend (DEVA11Y-476 / chain DEVA11Y-485). Also resolves the semgrep/ci
finding flagging the update config for lacking a minimum release age.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore(ci): rotate GitHub Actions via Dependabot + drift-alarm the Semgrep image
Dependabot's `docker` ecosystem cannot discover a `container:` image ref in a
workflow file (dependabot-core#5819), so the previous `docker`/`/.github/workflows`
config would never rotate the pin and would fail a weekly Dependabot job. Pivot:
- dependabot.yml: replace the unusable `docker` entry with a `github-actions`
entry (directory "/", weekly, cooldown default-days 7) — real, supported
rotation for the action `uses:` pins here, several of which are 3 years stale.
Drop the undefined `security` label and the redundant open-pull-requests-limit.
Cooldown retained (also clears the semgrep/ci dependabot-missing-cooldown rule).
- Add semgrep-image-pin-drift.yml: read-only scheduled/dispatch job that alarms
(fails) when the pinned returntocorp/semgrep@sha256 digest drifts from :latest,
keeping a human in the loop on the image bump (better for the C-001 threat model
than auto-adopting latest).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore(ci): address PR#38 round-2 review (cooldown/drift/pin/guard)
Resolves Nishant's second review on PR #38:
1. cooldown is inert for the github-actions Dependabot ecosystem — kept only
to satisfy Semgrep's dependabot-missing-cooldown rule; documented as inert
in dependabot.yml (no real release-age protection for action bumps).
2. Semgrep image drift workflow: made the intended-failure branches reachable
under GHA's injected `bash -e` (|| true on the grep/token/latest command
substitutions + explicit empty-token guard), same class of fix as #37
66249fe. Verified: happy/stale/pin-removed/registry-down all annotate+exit.
3. Reworked the alarm from "differs from :latest" (red most weeks → muted) to
"pinned image older than 45 days" (actionable). Bumped the Semgrep image
pin to the current :latest digest so it lands green:
f682953… -> f1f7b71861c7b28b6e0f661225a2c4f58a484f5d0f182465c6d6b3b22f972ade
(created 2026-08-20, ~8 days old).
4. Removed the job-level `if: github.actor != 'dependabot[bot]'` guard on
Semgrep.yml and scoped it to only the privileged upload-sarif step, so
Dependabot PRs that bump the action pins living in Semgrep.yml still get
scanned; only the security-events:write SARIF upload is skipped for them.
Also documented the scheduled-workflow ops caveat (60-day inactivity disable;
failed runs notify only the last cron editor) in the drift workflow.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 1ce64b6 commit e8ff791
3 files changed
Lines changed: 156 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| |||
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
0 commit comments