SkillSpector icon indicating copy to clipboard operation
SkillSpector copied to clipboard

PE2 flags chmod 600 and 0644 as privilege escalation

Open Spectorian opened this issue 2 months ago • 1 comments

Reproduction

Static probes emit PE2 for both of these scanner inputs:

chmod 600 "$SERVER_ID_FILE"
chmod 0644 notes.txt

The probes also detect chmod 4755 helper and chmod u+s helper. Reporting the ordinary restrictive modes as privilege escalation solely because of their digit patterns misstates the operation.

Expected behavior

Check the complete permission change. Preserve findings for setuid and other dangerous permission changes, and make uncertainty clear when a mode cannot be resolved. Cover restrictive and dangerous modes, including quoted, symbolic and malformed inputs.

This is a detector correction under the existing scoring policy.

Relevant code

static_patterns_privilege_escalation.py:81.

Spectorian avatar Sep 29 '26 00:09 Spectorian

Merge-state update checked on 2026-10-06: PR #678 has merged, and GitHub automatically closed this issue as completed.

Numeric chmod matching now reads the actual special-permission digit; restrictive 600/0644 modes are not treated as setuid/setgid. Focused chmod regressions pass.

rng1995 avatar Oct 04 '26 10:10 rng1995