Skip to content

fix(security): handle read-only passwd mounts with SkillSpector 2.13.3 - #289

Merged
rng1995 merged 7 commits into
mainfrom
naren/port-skillspector-passwd-mount
Nov 2, 2026
Merged

rng1995 merged 7 commits into
mainfrom
naren/port-skillspector-passwd-mount

Conversation

@rng1995

@rng1995 rng1995 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Tier 1 no longer blocks a skill solely for an exact read-only /etc/passwd bind mount. This is verified against newly captured SkillSpector v2.13.3 reports, including its separate findings for the mount source and target. A separate or same-line credential-file read still blocks.

  • Suppress only PE3 Credential Access rows for /etc/passwd carrying both contextual-triage and likely-benign-context, from SkillSpector 2.11.1 or newer. Each row must contain one occurrence matching its reported location, and every /etc/passwd on that source line must belong to an exact read-only Docker/Podman mount.
  • Recheck source files through SecureRoot: no symlinks, outside-root paths, oversized files, or invalid UTF-8. Cache reads per report. Writable or implicit-mode mounts, alternate paths, aggregated rows, missing source files, and older scanner versions remain reported.
  • Recompute aggregate risk using the existing conservative score reconstruction after removing exempt rows.
  • Accept a static report with llm_available=true: upstream defines this as provider availability, independently of whether LLM analysis ran. Continue rejecting contradictory llm_requested or meta_analysis_applied flags and invalid/incomplete reports.
  • Preserve incomplete inspection for all eight v2.13.3 llm_response_* reasons, even when every mount finding is exempt. The minimum supported triage version remains 2.11.1; the release retains the same PE3 mount contract.

Validation

  • Newly captured --no-llm v2.13.3 fixtures for a mount alone and a mount followed by cat /etc/passwd; fixture provenance, exact input, and regeneration steps are documented beside the reports. Older captured reports are no longer relabeled as later releases.
  • Adapter checks on real v2.13.3 reports: read-only mount passes; separate reads, same-line reads, writable mounts, and mounts without an explicit mode fail.
  • Regression coverage for both provider availability values, all eight incomplete-response reasons, source rechecks, unsafe paths, symlinks, and score reconstruction.
  • Final security suite: 527 passed, 1 skipped in an isolated locked environment with external scanners absent, matching CI's tool availability. Focused mount/metadata regressions: 53 passed.
  • Secure-read, reporting and provenance suites: 208 passed.
  • Full lint, OSS source-boundary check, package source/wheel build, and Fern documentation validation pass. Fern reports only the existing unauthenticated redirects-check warning.
  • Full project run: 18,766 passed, 30 failed, 30 skipped. Isolated reruns cleared 26 failures, including all new security cases, generated judge cases affected by the inherited Python executable, and the corrected fixture README boundary check.
  • Four local Harbor checks remain sensitive to process-startup deadlines under host load. Their source and tests are unchanged from the original PR head (d4501497a); two failures also reproduce there, while the other two pass that baseline run. Fresh CI is running on the latest commit.
Local full-suite limits

Remaining node IDs:

tests/test_harbor_runner_status.py::test_bounded_harbor_process_timeout_preserves_redacted_diagnostic_tail
tests/test_harbor_runtime_preflight.py::test_bedrock_model_probe_classifies_malformed_effective_proxy_as_fatal[http://[::1]
tests/test_harbor_runtime_preflight.py::test_bedrock_model_probe_classifies_malformed_effective_proxy_as_fatal[http://127.0.0.1:banana]
tests/test_harbor_runtime_preflight.py::test_bedrock_model_probe_classifies_real_invalid_region_as_fatal

The diagnostic-tail test has a 0.1-second process deadline. The bad-port Bedrock probe timed out after 2.011 seconds against a 2-second deadline; the IPv6 probe took 1.726 seconds when it passed on the original source. The original-source comparison passed two cases and reproduced the diagnostic-tail and bad-port failures. No Harbor implementation or test changes are included in this update.

… mounts

SkillSpector 2.10 and later reports `docker run -v /etc/passwd:/etc/passwd:ro`
as a HIGH Credential Access (PE3) finding. It tags the row as likely benign
context but keeps the severity. SkillEvaluator turned every HIGH row into a
blocking error, so a skill whose only credential access was a read-only
UID-map mount failed Tier 1 security scanning.

Drop a PE3 row only when all of these hold:
- SkillSpector tagged it contextual-triage and likely-benign-context.
- The report comes from SkillSpector 2.11.1 or later, which classifies each
  occurrence separately.
- The row covers exactly one occurrence at its reported location.
- Every /etc/passwd on the reported source line is the source or target of
  an exact read-only mount, using SkillSpector's own Docker/Podman mount
  grammar.

The line is re-read once per file through SecureRoot (no-follow, 1 MiB cap,
inside the scan root). Missing, linked, out-of-root, oversized or non-UTF-8
sources keep their findings. Ignored rows feed the existing removed-issue
score reconstruction, so an aggregate score that only they supported cannot
re-add a HIGH. Writable or implicit-mode mounts, other paths, same-line
reads such as `cat /etc/passwd`, aggregated rows and older scanners still
block.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the diff plus the SkillSpector result processing in security.py, and compared the regex and triage logic with SkillSpector's own PE3 code. No P1/P2/P3 findings.

Checked: the suppression requires PE3 + the exact finding text + both benign-context tags + a semver >= 2.11.1 + a single occurrence matching the location + a bounded no-follow read of the source line where every /etc/passwd occurrence is the source or target of an exact :ro mount. Any failure (unreadable, oversized, non-UTF-8, out-of-root, unsafe path text, older scanner, non-semver) keeps the finding. The regex is the same grammar as SkillSpector's _READ_ONLY_PASSWD_VOLUME, and line numbering via str.splitlines() matches SkillSpector's. The aggregate score is recomputed when anything is dropped, and the CHANGELOG/docs entries match.

Local results: ruff check clean; tests/validators/test_security.py -k 'passwd or skillspector' 266 passed.

Reviewed with Claude Code.

rng1995 and others added 3 commits November 2, 2026 10:51
Conflicted files: CHANGELOG.md

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts in docs/tier1-validation.mdx (kept main's LLM provenance
paragraphs and this PR's read-only /etc/passwd mount paragraph after them)
and tests/validators/test_security.py (kept both fixture constants).

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rng1995 rng1995 changed the title fix(security): ignore SkillSpector PE3 on exact read-only /etc/passwd mounts fix(security): handle read-only passwd mounts with SkillSpector 2.13.3 Nov 2, 2026
@rng1995
rng1995 enabled auto-merge (squash) November 2, 2026 20:27

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through the exact-mount check, including the 2.13.3 alignment, and could not find a way around it: I fed the real analyzer's PE3 rows (two per mount, source and target) through the helper with a trailing ; cat /etc/passwd, a read in a comment, a second rw mount on the same line, a double mount, an uppercase mount, line continuations, and form feed, vertical tab, NEL, CR and U+2028 line breaks, and every real read stays reported. The line numbering matches SkillSpector's own line splitting, and the llm_available relaxation keeps the llm_requested and meta_analysis_applied contradictions as errors. Nothing blocking.

@rng1995
rng1995 merged commit ffa78ba into main Nov 2, 2026
21 checks passed
@rng1995
rng1995 deleted the naren/port-skillspector-passwd-mount branch November 2, 2026 21:01
rng1995 added a commit that referenced this pull request Nov 6, 2026
* docs(changelog): move entries released in 0.7.0-0.7.2 out of Unreleased

0.7.0 (#314) and 0.7.1 (#327) never cut their sections on main, and 0.7.2
(#335) added its section below the whole Unreleased block, so Unreleased
still listed work that had already shipped.

Place each Unreleased entry under the release that shipped the PR that
added it:

- 0.7.0: the published section from the 0.7.0 tag, verbatim. It already
  holds the six entries that main had filed under 0.6.0, so 0.6.0 again
  matches the v0.6.0 tag, including the original run_config.json entry.
- 0.7.1: #264 #271 #274 #281 #284 #289 #293 #299 #316 #317 #318 #323
  #324 #326 #327, plus the #320 wording of the Windows Git-root entry,
  since #320 changed that 0.7.0 fix in 0.7.1.
- 0.7.2: #263 #265 #269 #270 #276 #279 #287 #290 #296 #309 #328 #330
  merged with the existing #335 entries.

Only post-v0.7.2 entries stay under Unreleased, with one heading per
subsection. Entry text is unchanged, apart from the published tag wording
in 0.7.0 and 0.6.0.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(release): prepare v0.8.0

Set the package, fallback, lock, citation and developer-guide versions to
0.8.0 and move every entry merged since v0.7.2 under
'## 0.8.0 - 2026-11-05', leaving Unreleased empty.

The refusal-fallback documentation test now reads the release section
that names CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK, requires it to be 0.8.0,
and requires exactly one entry there to name the switch.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(release): pin the verified 0.8.0 Tier 1 image and add its CI bundle

Pin onboarding to the Tier 1 image published by the reviewed main revision
55d2d04 in "Build and publish Tier 1 image" run 42158955180:
ghcr.io/nvidia/skillevaluator-tier1@sha256:9d5483243918937be4f2178f74cf7c622a531dee41e3176906994d52fa14950a
(config sha256:d17d6f5105ec5f1bf0cbe4dff0d693aae4ecf01e9c1c6a6ddb7830518acace33).
The workflow and publisher refs both move to 55d2d04.

ci/bundles/0.8.0 mirrors the 0.7.2 bundle. The templates, README and
release.json are the run's github-actions-onboarding artifact and match
ci/render_templates.py output for these pins byte for byte. The scanner
inventory and verification receipt come from the build's runtime-stage
version step, the five-case smoke receipt, the onboarding job's anonymous
pull, and the public manifest, whose config digest equals the smoke-tested
image ID. The ZIP uses the 0.7.2 layout (sorted members, inner checksums,
1980 timestamps, 0644, deflate level 9) and rebuilds to identical bytes.

Point the current-bundle links at 0.8.0 and list 0.7.2 as historical.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>

---------

Signed-off-by: Narendran Raghavan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

2 participants