fix(ci,device): drop workflow_dispatch ref input + narrow bare except in CPU info parser - #2914
fix(ci,device): drop workflow_dispatch ref input + narrow bare except in CPU info parser#2914vpetersson wants to merge 1 commit into
Conversation
… in CPU info parser - .github/workflows/marketing-screenshots.yaml: remove `inputs.ref` from workflow_dispatch. The GH UI's "Use workflow from" picker already sets github.ref; the explicit input only gave API callers with a stolen actions:write token a way to dispatch against an attacker-supplied SHA / fork ref. - src/anthias_common/device_helper.py: replace bare `except Exception: pass` in parse_cpu_info with a split-length guard. Also fixes a latent bug where `value` could be referenced unbound after a malformed `/proc/cpuinfo` line fell through the except. - .gitignore: add the shoulder.dev local cache directory. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Superseded by #3217. That PR was opened from a stale worktree branch (2026-05); all three findings are still present on |
|
Reimplemented as #3217 (built on current Safe to close in favor of #3217 whenever you're ready — I don't have permission to close it from here. |



Issues Fixed
Addresses two legitimate findings from a shoulder.dev security scan. The rest of the report was triaged as false positives (the upload path-traversal sinks are protected by
uuid.*().hex+_SAFE_EXT_RE; the@authorizeddecorator covers the routes shoulder flagged as "missing authz";mark_safeinasset_filters.to_jsonis preceded by JSON-encode and&<>'hex-escape; the open-redirect sink usesreverse()+url_has_allowed_host_and_scheme; etc.).Description
.github/workflows/marketing-screenshots.yaml— drop theworkflow_dispatchinputs.ref. The GH UI's "Use workflow from" picker already setsgithub.reffor operator-triggered runs, so the explicit input only added capability to API callers — a stolenGITHUB_TOKENwithactions:writecould otherwise dispatch this workflow against an attacker-supplied SHA / fork ref and execute it on a runner.src/anthias_common/device_helper.py— replaceexcept Exception: passinparse_cpu_infowith an explicit split-length guard +continue. Also fixes a latent bug: under the oldpassfall-through, a malformed/proc/cpuinfoline would land in theif key in [...]: cpu_info[key.lower()] = valueblock withvaluecarried over from the previous iteration (or unbound on the first line)..gitignore— shoulder.dev's local cache directory.Checklist
🤖 Generated with Claude Code