Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
0f27428
fix(tier1): scope SkillSpector agent-threat findings to agent control…
rng1995 Oct 30, 2026
d2fcce7
Merge main into naren/port-agent-security-control-paths
rng1995 Nov 2, 2026
a6c58bf
fix(tier1): keep plugin default component findings blocking
rng1995 Nov 2, 2026
5c933fb
fix(tier1): keep the reference walk's import fallback linear
rng1995 Nov 2, 2026
33259ab
fix(tier1): score kept SkillSpector findings once per serialized record
rng1995 Nov 2, 2026
7540b6c
fix(tier1): label the applicable and raw SkillSpector risk scores
rng1995 Nov 2, 2026
0bc6ad0
fix(tier1): rename the applicability block's kept issue count
rng1995 Nov 2, 2026
38bccbd
fix(tier1): stop bare directory words from reaching every file under …
rng1995 Nov 2, 2026
d3b24a8
test(tier1): pin the reference walk's file, size and manifest budgets
rng1995 Nov 2, 2026
e061065
docs(tier1): say executable test and UI files stay blocking
rng1995 Nov 2, 2026
bfd29b6
docs(tier1): list every unnamed top-level file that is suppressed
rng1995 Nov 2, 2026
8019f73
fix(tier1): follow symlinks, globs, and shell directories in the refe…
rng1995 Nov 3, 2026
68aee01
Merge main into naren/port-agent-security-control-paths
rng1995 Nov 3, 2026
e42e004
fix(tier1): let scripts reach a directory they name as a bare argument
rng1995 Nov 3, 2026
96321b5
fix(tier1): weight a kept rule's most severe finding first
rng1995 Nov 3, 2026
949be8a
Merge main into naren/port-agent-security-control-paths
rng1995 Nov 4, 2026
3703492
Merge main into naren/port-agent-security-control-paths
rng1995 Nov 5, 2026
f955ff4
Merge main into naren/port-agent-security-control-paths
rng1995 Nov 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,29 @@ All notable changes to SkillEvaluator are documented in this file.
malformed `metadata`, and the quality score counts `metadata.author` and
`metadata.tags` as missing, as it already did for other non-mapping values.

- Tier 1 `security` no longer fails a skill, rules, workflows, or plugin
artifact on SkillSpector agent-threat matches in files no agent reads or
runs, such as UI strings, test fixtures, documentation, notebooks, images,
and lockfiles. Findings stay blocking on agent control paths (instructions,
references, executables, agent configuration, MCP and plugin manifests) and
on any file those reference by path, file name, skill or plugin root
variable or placeholder (`${CLAUDE_SKILL_DIR}`, `$SKILL_DIR`, `$SKILL_ROOT`,
`${CLAUDE_PLUGIN_ROOT}`, `{baseDir}`, `<skill-dir>`), install path, or
import, without regard to case. An issue that SkillSpector reports for
several files is suppressed only when every one of its occurrences is
outside agent control paths. Supply-chain findings, YARA malware
signatures, and artifact-integrity findings for a misleading extension or
embedded NUL bytes still apply on every path, and a file named as a raster
image keeps its findings unless its content is an image. A location or
occurrence that is missing or escapes the artifact through `..` or a
symlink keeps its finding. Malformed occurrences, a report that serializes
fewer occurrences than it counted, an unloadable manifest, and an
unfinished reference walk keep every affected finding. Suppressed issues
are left out of the aggregate risk-score gate, counted in a `filtered`
summary row, and recorded in the JSON report's `skillspector_applicability`
block. `security-scan` and targets of `unknown` type keep the unrestricted
scan.

## 0.6.0 - 2026-10-20

### Added
Expand Down
34 changes: 34 additions & 0 deletions docs/tier1-validation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,40 @@ For `validate`, the default set is `schema`, `version`, `security`, `pii`, `lice
```

The LLM pass requires a configured provider. It enriches the static result but does not replace static findings or make missing scanner evidence pass.

**Agent control paths.** SkillSpector rules describe attacks on an agent, so a match is an agent threat only in a file the agent reads or runs. When `validate` or `tier1` detects a skill, rules, workflows, or plugin artifact, the `security` check keeps findings on agent control paths and suppresses the rest:

| File role | Tier 1 finding | Examples |
| --- | --- | --- |
| Agent instruction | Kept | `SKILL.md`, `AGENTS.md`, `*.mdc`, `commands/`, `prompts/`, `rules/`, `workflows/` |
| Agent reference | Kept | `references/`, `templates/`, non-image `assets/`, other data and code files at the artifact root |
| Agent executable | Kept | `scripts/`, `tools/`, `hooks/`, and any file SkillSpector marks executable (for example `.py`, `.sh`, `.js`) |
| Agent configuration | Kept | top-level `config/`, `.claude/`, `.codex/`, `.cursor/`, and other agent settings directories |
| MCP and plugin manifests | Kept | `.mcp.json`, `mcp.yaml`, `agent_plugin.yaml`, `.claude-plugin/plugin.json` |
| Referenced file | Kept | any file a kept file names by path, by file name alone (`helper.md` for `lib/helper.md`), by skill or plugin root variable, or by import, followed transitively |
| Ordinary file | Suppressed | other source and UI code, `tests/`, `docs/`, notebooks, images, lockfiles, other data |
Comment thread
rng1995 marked this conversation as resolved.
Resolved

The reference walk recognizes these forms, without regard to case:

- A path relative to the artifact or to the referring file, such as `docs/guide.md`, `./docs/guide.md`, `../lib/helper.py`, or `docs\guide.md`.
- A path behind a skill or plugin root: `${CLAUDE_SKILL_DIR}/`, `$SKILL_DIR/`, `$SKILL_ROOT/`, and `${CLAUDE_PLUGIN_ROOT}/`, in shell, PowerShell (`$env:NAME`), and cmd (`%NAME%`) forms, and a skill-directory placeholder whose name contains `skill` or `base`, such as `{baseDir}/`, `{{skill_dir}}/`, or `<skill-dir>/`.
- A path with a directory behind any other prefix, such as an install location (`~/.claude/skills/demo/docs/guide.md`), a root-relative path (`/docs/guide.md`), or another placeholder (`<root>/docs/guide.md`). A top-level file behind a prefix counts when the prefix ends with the artifact's directory name (`~/.claude/skills/demo/README.md` for a skill in `demo/`).
- A bare file name of a nested file, a directory name for every file under it, and Python and JavaScript imports, including `-m` module forms.

SkillSpector can report identical matches from several files as one issue: `location` names one of the files and `occurrences` lists all of them. Such an issue is suppressed only when every file in it is outside agent control paths. If any occurrence is on a control path or in a referenced file, the issue is kept with that file's role.

A single-file target, such as one rules file, is always an agent control path. Supply-chain findings (`SC*`), YARA malware, webshell, and cryptominer signatures (`YR1`–`YR3`), and artifact-integrity findings for content that does not match its extension or a text file with embedded NUL bytes (`AE2`, `AE3`) are kept on every path because they describe what the artifact ships. A file named as a raster image (`.png`, `.jpg`, `.gif`, `.webp`, `.ico`, `.avif`) is treated as an image only when its content starts with an image signature; otherwise its findings are kept with file role `unverified_image`. Suppressed issues no longer count toward the aggregate SkillSpector risk-score gate. The terminal summary shows a `filtered` row, and the JSON report records a per-result `skillspector_applicability` block with the kept and suppressed counts, the suppressed counts by file role, and the raw and applicable risk scores. Kept findings carry `artifact_type`, `file_role`, and `applicability` metadata.

Classification fails closed when it cannot place a finding or finish the reference walk:

- An issue keeps its finding when a location or occurrence is missing, outside the artifact, or reached through an escaping symlink, or when its `occurrences` field is malformed.
- Every finding is kept when the report serializes fewer occurrence records than its `analysis_completeness.findings_after_filtering` count, because the unserialized findings have no location.
- Every finding is kept when the walk meets a symlinked directory, a file it cannot read as text, or a plugin manifest it cannot load, such as one with an invalid YAML date. Verified raster images and fonts are the exception, because they hold no path text. A PDF, Office document, or other binary file in a control location, such as `assets/guide.pdf`, therefore keeps the unrestricted scan for that skill.
- Every finding is kept when the walk exceeds a budget: a file it reads is over 1 MB, it reads more than 5 MB or 1,000 files, the artifact has more than 10,000 files, or it needs too many reference comparisons. Very large skills can therefore keep the unrestricted scan.

The walk recognizes references written as text. A file that a control file reaches only through a path it builds at run time, such as `"web/" + name`, is not followed. Neither is a top-level file named behind a prefix that is not a recognized root variable or placeholder and does not end with the artifact's directory name, such as `<root>/README.md` or an install directory with a different name. Top-level files other than READMEs, test files, notebooks, images, and lockfiles are agent references whether or not they are named.
Comment thread
rng1995 marked this conversation as resolved.
Resolved

`security-scan`, and `validate` on a target whose type is `unknown`, keep the unrestricted scan and report every SkillSpector finding.
</Accordion>

<Accordion title="pii — PII, credentials, and local identifiers">
Expand Down
16 changes: 16 additions & 0 deletions src/skillevaluator/reporting/console_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,22 @@ def summarize_tier1(results: list[ValidationResult], lineup: list[str] | None =
detail = " · ".join(f"{name} {count}" for name, count in sorted(advisory.items(), key=lambda kv: -kv[1]))
rows.append(TierRow("advisories", [(str(sum(advisory.values())), TEXT), (f" {detail}", MUTED)]))

suppressed_security = 0
for r in results:
applicability = (r.metadata or {}).get("skillspector_applicability")
if isinstance(applicability, dict):
count = applicability.get("suppressed_inapplicable_issues")
if isinstance(count, int) and not isinstance(count, bool) and count > 0:
suppressed_security += count
if suppressed_security:
noun = "issue" if suppressed_security == 1 else "issues"
rows.append(
TierRow(
"filtered",
[(f"{suppressed_security} scanner {noun} suppressed outside agent control paths", MUTED)],
)
)

quality = _quality_stats(results)
if quality:
grade, score = quality
Expand Down
6 changes: 6 additions & 0 deletions src/skillevaluator/reporting/json_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ def _result_to_dict(self, result: ValidationResult) -> dict[str, Any]:
if isinstance(coverage, list):
data["dependency_coverage"] = coverage

# Tier 1 SkillSpector file-role scoping: retained and suppressed issue
# counts, and the raw versus applicable aggregate risk score.
skillspector_applicability = result.metadata.get("skillspector_applicability")
if isinstance(skillspector_applicability, dict):
data["skillspector_applicability"] = skillspector_applicability

qs = result.metadata.get("quality_scores")
if qs:
data["quality"] = qs
Expand Down
14 changes: 13 additions & 1 deletion src/skillevaluator/tier1/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@

ValidatorRunner = Callable[[Path], ValidationResult]

_AGENT_ARTIFACT_CONTENT_TYPES = frozenset(
{CONTENT_TYPE_SKILL, CONTENT_TYPE_RULES, CONTENT_TYPE_WORKFLOWS, CONTENT_TYPE_PLUGIN}
)

DEFAULT_CHECKS = (
"schema",
"version",
Expand Down Expand Up @@ -229,7 +233,15 @@ def _schema_results() -> list[ValidationResult]:
return [_run_result("schema", v.name, v.description, v.validate)]

def _security_results() -> list[ValidationResult]:
v = SecurityValidator(use_llm=use_llm, verify_llm=llm_verify)
# Agent-security findings are scoped to agent control paths only for a
# detected agent artifact; an unknown layout keeps the unrestricted
# scan that ``security-scan`` runs.
v = SecurityValidator(
use_llm=use_llm,
verify_llm=llm_verify,
content_type=content_type if content_type in _AGENT_ARTIFACT_CONTENT_TYPES else None,
skillspector_reference_root=target_path if content_type == CONTENT_TYPE_PLUGIN else None,
)
return [_run_result("security", "Security Scan", v.description, v.validate_security_only)]

def _pii_results() -> list[ValidationResult]:
Expand Down
Loading
Loading