Skip to content

feat: NS8 security audit harness skills - #4

Draft
gsanchietti wants to merge 2 commits into
mainfrom
security-audit-harness
Draft

feat: NS8 security audit harness skills#4
gsanchietti wants to merge 2 commits into
mainfrom
security-audit-harness

Conversation

@gsanchietti

Copy link
Copy Markdown
Member

Summary

Adds a three-stage defensive-security skill harness for NethServer 8, alongside the existing dev-workflow skills. Audits ns8-core or any ns8-<app> module for NS8-specific security defects, then validates findings against a live cluster node.

Pipeline (threat-model → audit → verify):

  • nethserver-threat-model — maps the attack surface (actions, api-moduled handlers, exposed routes/ports, privileged Redis usage, secret flows, trust boundaries) → THREAT_MODEL.md.
  • nethserver-security-audit — static audit across six NS8 domains (auth/authz, action & event input, Redis privilege boundary, api-moduled handler injection, secrets, proxy/X-Forwarded-For trust). Parallel per-domain checks + deterministic scan-antipatterns.sh recall floor → FINDINGS.json + FINDINGS.md.
  • nethserver-security-verify — confirms each finding against a live NS8 leader with read-only api-cli/runagent/podman/curl probes → VERIFIED.md. Requests live-node access up front; degrades to static reasoning without it. No state changes unless explicitly authorized.

Container-image hardening is delegated to the existing nethserver-containerfile. Live probes reuse the nethserver8 skill safety rules.

Design spec included at docs/specs/2026-07-10-ns8-security-audit-harness-design.md.

Related issue

None yet — draft, assigned per the no-issue draft convention.

How to test

Static (no live node needed):

bash skills/nethserver-security-audit/scripts/scan-antipatterns.sh /path/to/ns8-core

Confirm it surfaces (with correct file:line) SetTrustedProxies, authz filepath.Match, Method == "GET" bypass, empty AMLD_JWT_SECRET, and every redis_connect(privileged=True) site, while excluding vendored/build dirs.

End-to-end: run /nethserver-threat-model/nethserver-security-audit/nethserver-security-verify against a test NS8 checkout and a test/staging leader node.

Dependencies

None.

Design for a three-stage skill harness (threat-model -> audit -> verify)
that audits ns8-core and ns8 modules for NS8-specific security defects
and validates findings against a live cluster node.

Assisted-by: Claude Code:claude-fable-5
Three skills forming a defensive-security pipeline for NethServer 8:

- nethserver-threat-model: map attack surface (actions, api-moduled
  handlers, routes/ports, Redis privilege, secret flows) -> THREAT_MODEL.md
- nethserver-security-audit: static audit across auth/authz, action
  input, Redis privilege, api-moduled injection, secrets, proxy trust;
  parallel per-domain checks + grep seeder -> FINDINGS.json/.md
- nethserver-security-verify: confirm findings on a live leader with
  read-only api-cli/runagent/podman/curl probes -> VERIFIED.md

Works on both ns8-core and ns8-<app> modules. Container hardening is
delegated to nethserver-containerfile.

Assisted-by: Claude Code:claude-fable-5
@gsanchietti gsanchietti self-assigned this Jul 10, 2026
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