Repository navigation
security: JS _0x identifiers, pull_request_target + head ref, toJSON(secrets) rules (Part of #8433) - #8630
Conversation
…secrets) rules (Part of #8433) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #8630 @ ea465c7: 1 failed check(s) == measure (shard 1/4) (failure) -- real |
Summary
Slice 2 of 2 for #8433 (slice 1: #8614). Three more
high_risk_executionmembers inSecurityLens, each scoped byHIGH_RISK_EXECUTION_SCOPE(#5463):_0x+ 4-6 lowercase hex used as a call, an index or a string-array / wrapper assignment (JS family only).pull_request_targetworkflow whoseref:/repository:/run:line or script-body line expandsgithub.head_reforgithub.event.pull_request.head.(ref|sha|repo.full_name)(YAML only). Bounded to 150 lines after the trigger.${{ toJSON(secrets) }}(whole secrets context; yaml / markdown via the existing${{scope).Tests:
tests/security_auditing/test_js_actions_malware_idioms_8433.py, with a planted case and a near-miss per rule (0x1a2b3c,my_0x1a2b,_0xFFFF, bare_0x1a2b = 5; head_ref passed through anenv:var, plainpull_request,github.base_ref;toJSON(github),toJSON(secrets.X),toJSON(vars)), plus language-scope tests.Class / Sibling gaps
Class: common malware idioms with no SecurityLens rule (#8433). Members: Python exec / b64decode-write / marshal.loads (done, #8614);
_0xobfuscator identifiers (done here);pull_request_target+ head ref (done here);toJSON(secrets)(done here). Every member of the issue table is now handled.Sibling gaps (not done, different mechanism): (1) javascript-obfuscator string-array rotation by shape alone (no
_0xnames, e.g.--identifier-names-generator mangled): needs a structural rule, not a name match; (2) a head ref more than 150 lines after thepull_request_targettrigger is not seen (bounded for ReDoS); (3)actions/checkoutof an untrusted ref via a step output rather than agithub.*expression.Gates
pr_gates --fast: 9/9 pass.crucible_check.py(both golden legs): PASS, no drift.pr_gates --ratchets: 6 pass;fact-crosscheck,completeness,ground-truthfail only because the mainframe corpusexample-health-apisis not fetched on this box ("not fetched at its pinned ref"); they do not touch SecurityLens. CI is the check for them.tests/security_auditing+test_source_reads.py: 1114 passed, 2 skipped, 2 xfailed.🤖 Generated with Claude Code