fix(security): forgejo-api.sh passes token via curl argv — use config-file pattern like mirror workflow #371
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#371
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
External cold-read round 3:
scripts/lib/forgejo-api.sh:77-85uses:This can expose secrets in process arguments (visible via
ps) on some systems.The Codeberg mirror workflow already uses the safer pattern:
(curl config file pattern — token stays out of argv)
Blocking rationale
Reviewer verbatim: 'In CI it may be masked in logs, but masking logs is not the same thing as avoiding process-argument exposure.'
For a tool that wants token access + release authority, this is not a hypothetical concern — it's inconsistency between the mirror workflow (correct) and forgejo-api.sh (unsafe) on the same substrate. Consistency alone justifies the fix.
Fix path
forgejo-api.shto use curl --config or --header-file patternVerification AC
psinspection during forgejo-api.sh execution shows no token in argvAnchor
External cold-read round 3 (fresh ChatGPT session, 2026-07-04) verdict 'promising but not yet trustworthy'. Reviewer verified via execution (dry-run fresh-repo → v0.0.0 → feat → v0.1.0 all worked correctly). New findings surfaced despite round-2 delta closures. Operator ratified delta plan 2026-07-04. This tracker addresses one of the round-3 findings. Success criterion: subsequent external cold-read returns no further objections of this class.
BLOCKING v1.0.0.
Delta merged via PR #375 at
9a5e407. All 6 FORGEJO_TOKEN-via-curl-argv exposures refactored to 0600-mode config-file pattern matching reusable-mirror-to-codeberg.yml:184-193 (#317). New shared_forgejo_auth_config_newhelper in forgejo-api.sh; setup-bump-labels.sh inlines the same shape with trap-on-EXIT cleanup.