Skip to content

ops(security): demote security-events:write + fix downloadThenRun pattern#161

Merged
amavashev merged 1 commit into
mainfrom
ops/scorecard-permissions-and-downloadthenrun
May 3, 2026
Merged

ops(security): demote security-events:write + fix downloadThenRun pattern#161
amavashev merged 1 commit into
mainfrom
ops/scorecard-permissions-and-downloadthenrun

Conversation

@amavashev
Copy link
Copy Markdown
Collaborator

Two Scorecard HIGH findings:

  1. pr-container-scan.yml: TokenPermissionsID — topLevel 'security-events' permission set to 'write'. Same fix as cycles-server#144: top-level drops to read-all, security-events: write moves to the scan job (only the Trivy SARIF upload needs it).

  2. release.yml:150: PinnedDependenciesID — downloadThenRun not pinned by hash. The pattern curl ... | python -c ... triggers Scorecard's heuristic regardless of source URL (here it's a localhost smoke probe — false positive in intent but still bad pattern). Refactor: capture body first, then pipe to python. Same behavior, no curl-pipe-interpreter shape.

…adThenRun

Two Scorecard high-severity findings addressed:

1. pr-container-scan.yml: TokenPermissionsID HIGH -- 'topLevel
   security-events permission set to write'. Same fix pattern as
   cycles-server PR #144: top-level drops to read-all, security-events:
   write moves to the scan job (only step that needs it is the Trivy
   SARIF upload).

2. release.yml line 150: PinnedDependenciesID 'downloadThenRun not
   pinned by hash'. The pattern was 'curl ... | python -c ...' which
   Scorecard's heuristic flags as a supply-chain risk regardless of the
   source URL (here it's a localhost smoke probe, not external). Refactor
   to capture the body first, then pipe to python -- same behavior, no
   footgun pattern.
@amavashev amavashev enabled auto-merge (squash) May 3, 2026 01:57
@amavashev amavashev merged commit 9edd0cd into main May 3, 2026
6 of 7 checks passed
amavashev added a commit that referenced this pull request May 3, 2026
Same fix as runcycles/cycles-server#145 and runcycles/cycles-server-events#54.
Trivy on cycles-server-admin's image flagged the same gnutls 3.8.12-r0
HIGH/MEDIUM/LOW CVEs that affect every consumer of the upstream
eclipse-temurin:21-jre-alpine tag at this point in time.

'apk upgrade --no-cache' closes the patch-level gap on every build,
so future Alpine CVE patches are picked up without manual intervention.

Unblocks PR #161 (which has been failing the pr-container-scan step
for the same root cause).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant