Commit d8f2c17
ci: add lint + Trivy upstream-image scan jobs (#19)
Closes the supply-chain gap between this deployment-template repo and
the aws-kubectl-docker image-publishing reference. After this PR, the
deployment-verification workflow matches aws-kubectl's publish.yml
shape modulo the cosign/SBOM/SLSA steps that don't apply to a repo
that doesn't publish its own image.
New jobs in .github/workflows/deployment-verification.yml:
- `lint` — blocking, runs first:
- shellcheck (via koalaman/shellcheck-alpine:stable) on every *.sh
in the repo root. Catches regressions of the warnings fixed in
PR #18.
- actionlint (via rhysd/actionlint:1.7.12) on every workflow YAML.
Catches typos, invalid step references, common GitHub Actions
footguns the YAML parser doesn't catch.
- deploy-and-test now depends on lint via `needs:` so CI fails fast
on lint errors before burning the 15-minute compose-up slot.
- `scan-trivy` — matrix job, one per pinned upstream image:
- postgres:16@sha256:71e27bf6...
- traefik:3.2@sha256:e561a37f...
- quay.io/keycloak/keycloak:26.2.5@sha256:4883630e...
Each scans for CRITICAL/HIGH fixable CVEs via
aquasecurity/trivy-action@v0.35.0 (pinned to commit SHA), uploads
SARIF to the GitHub Security tab under distinct categories
(trivy-postgres / trivy-traefik / trivy-keycloak) for separate
triage.
continue-on-error: true — CVE findings surface for triage (Dependabot
digest bump → PR) but don't hard-block CI. A hard block would cause
red CI on every new CVE disclosure which isn't actionable inside
this PR.
fail-fast: false on the matrix — one image scan failing doesn't
cancel the other two.
Run-block hygiene:
- Two existing `timeout 5m bash -c '...'` blocks (HTTP smoke checks)
trip shellcheck SC2016 because `$APP_HOSTNAME` inside single quotes
looks like a missed expansion. The deferred-expansion is intentional
(inner bash inherits the job-level env:). Added explicit
`# shellcheck disable=SC2016` directives with rationale comments
immediately before the affected `timeout` invocations so actionlint
passes without changing behaviour.
CHANGELOG [Unreleased] → Changed updated with detailed bullet covering
the new lint + scan-trivy jobs and the PR-18 fixes.
No change to deploy-and-test behaviour: same env, same network setup,
same compose invocation, same HTTPS + Traefik-dashboard smoke checks,
same teardown. Just gated on `lint` success.
Co-authored-by: Vladimir Mikhalev <ask@sre.gg>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 9241e87 commit d8f2c17
2 files changed
Lines changed: 100 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 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 | + | |
24 | 98 | | |
25 | 99 | | |
26 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
27 | 105 | | |
28 | 106 | | |
29 | 107 | | |
| |||
85 | 163 | | |
86 | 164 | | |
87 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
88 | 169 | | |
89 | 170 | | |
90 | 171 | | |
| |||
93 | 174 | | |
94 | 175 | | |
95 | 176 | | |
| 177 | + | |
| 178 | + | |
96 | 179 | | |
97 | 180 | | |
98 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
26 | 43 | | |
27 | 44 | | |
28 | 45 | | |
| |||
0 commit comments