Skip to content

Commit c577a0d

Browse files
Yoseph-ZuskinOpenCode DeepSeek V4.1 Flash Free (200K context)
andcommitted
Merge remote-tracking branch 'upstream/main' into feat/copilot-cli-provider
Signed-off-by: Yoseph Zuskin <[email protected]> Co-Authored-By: OpenCode DeepSeek V4.1 Flash Free (200K context) <[email protected]>
2 parents 1a8bde1 + d501c0d commit c577a0d

79 files changed

Lines changed: 6439 additions & 360 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.env.example‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ AZURE_OPENAI_ENDPOINT=
8383
# For SKILLSPECTOR_PROVIDER=openai_compatible.
8484
SKILLSPECTOR_COMPAT_API_KEY=
8585
SKILLSPECTOR_COMPAT_BASE_URL=
86+
# Optional JSON object with string header names and values; may contain secrets.
87+
# SKILLSPECTOR_COMPAT_HEADERS='{"X-Tenant-ID":"my-tenant","X-API-Key":"gateway-key"}'
8688

8789
# claude_cli, copilot_cli, gemini_cli, and opencode_cli use their CLI's existing local
8890
# authentication session and do not need an API key here.

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### 2.12.0 (Unreleased)
22
### Features/Bug Fixes
3+
* fix(static): stop Markdown code fence lines from reading as an open quote that merges consecutive shell lines into one marker directive (#868)
34
* fix(sc8): count only the bytecode walk's own CPU time against its 5 s budget, so time spent waiting behind concurrent analyzers no longer reports a static `runtime_limit` for skills that ship no bytecode (#828)
45
* fix(providers): cut per-call cost of CLI-provider scans and default their LLM fan-out to 2 (#808)
56
* fix(taint): key TT1-TT6 taint by lexical scope and follow direct calls to functions and methods defined in the same file, so a tainted variable no longer taints same-named variables in other functions (#799). Message-glob baseline rules keep matching TT findings whose rule and message are unchanged; exact baseline fingerprints are bound to the scanner version and suppress nothing after an upgrade (see docs/SUPPRESSION.md), so they must be regenerated in any case. A TT message changes where the earlier message came from a same-named variable in another scope (it now names the variable, source and line that reach the sink); where a more severe source raises the rule (TT2 to TT3 or TT4, TT4 to TT3, TT2 to TT5 or TT6), and at such a sink, where a weaker finding is subsumed or now cites another variable; and where an identifier longer than 120 characters is now shortened. Re-accept those findings or regenerate the baseline. `match_fingerprint` changes only when the rule does.

‎README.md‎

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,23 @@ skillspector scan ./my-skill/ --format markdown --output report.md
169169
skillspector scan ./my-skill/ --format sarif --output report.sarif
170170
```
171171

172+
### Recursive Collection Scanning
173+
174+
`--recursive` scans immediate subdirectories containing `SKILL.md` as independent
175+
skills, with a default aggregate limit of **32 skills**. To raise or lower it:
176+
177+
```bash
178+
skillspector scan ./my-skills/ --recursive --max-skills 100 --no-llm --format json
179+
```
180+
181+
`--max-skills` requires a local recursive collection and a positive integer; `0`
182+
does not mean unlimited. Discovery, byte, finding-record, time and report-size
183+
budgets still apply, so increasing the count does not guarantee complete coverage.
184+
When the count limit is reached, the CLI names the limit and suggests adjusting it
185+
or scanning sub-skills separately. Omitted skills remain visible in the aggregate
186+
report and coverage stays incomplete. Use `--fail-on-incomplete` in CI to fail on
187+
incomplete coverage; the default exit policy is unchanged.
188+
172189
### Batch Scanning
173190

174191
Scan entire directories of skills in parallel from `contrib/batch_scan/`:
@@ -302,9 +319,15 @@ inference gateways.
302319
| `openai_compatible` | `SKILLSPECTOR_COMPAT_API_KEY` + `SKILLSPECTOR_COMPAT_BASE_URL` | Any OpenAI-compatible endpoint | `llama-3.1-70b-versatile` |
303320
| `claude_cli` | _(none — uses local CLI auth)_ | local `claude` binary | local Claude runtime fallback, or `SKILLSPECTOR_MODEL` |
304321
| `codex_cli` | Disabled | Registered for compatibility; its read-only sandbox permits host-file reads | Use an HTTP API provider or another supported CLI provider |
305-
| `copilot_cli` | _(none — uses local CLI auth)_ | local `copilot` 1.0.103 binary | local Copilot runtime fallback, or `SKILLSPECTOR_MODEL` |
322+
| `copilot_cli` | _(none — uses local CLI auth)_ | local `copilot` 1.0.105 binary | local Copilot runtime fallback, or `SKILLSPECTOR_MODEL` |
306323
| `gemini_cli` | _(none — uses local CLI auth)_ | local `gemini` binary | local Gemini runtime fallback, or `SKILLSPECTOR_MODEL` |
307-
| `opencode_cli` | _(none — uses local CLI auth)_ | local `opencode` 1.18.33 binary | local OpenCode runtime fallback, or `SKILLSPECTOR_MODEL` |
324+
| `opencode_cli` | _(none — uses local CLI auth)_ | local `opencode` (verified 1.18.31–1.18.35, 1.19.0–1.19.4) binary | local OpenCode runtime fallback, or `SKILLSPECTOR_MODEL` |
325+
326+
For `openai_compatible` gateways requiring extra HTTP headers, set
327+
`SKILLSPECTOR_COMPAT_HEADERS='{"X-Tenant-ID":"my-tenant","X-API-Key":"gateway-key"}'`.
328+
It must be a JSON object with string keys and values and applies to sync and async requests.
329+
Unset or blank values add no headers; invalid configuration is rejected without exposing header values.
330+
Treat this environment variable as a secret when it contains gateway API keys.
308331

309332
`gpt-6.1-sol`, `claude-opus-5-5`, and `claude-sonnet-5-5` remain opt-in through
310333
`SKILLSPECTOR_MODEL` or per-slot overrides. Promoting them to defaults requires
@@ -777,9 +800,9 @@ Issues (2)
777800
778801
> **CLI providers** (`claude_cli`, `copilot_cli`, `gemini_cli`, `opencode_cli`): No API key is needed. Authentication is managed entirely by the agent CLI's own login session. SkillSpector never reads or forwards API keys when these providers are active, except `copilot_cli` deliberately preserves only `COPILOT_GITHUB_TOKEN` (its documented headless auth) while dropping every other `COPILOT_*`, all `GITHUB_COPILOT_*`, and the `GH_TOKEN` family. The subprocess is run with capabilities restricted, and untrusted skill content is delivered only via stdin.
779802
>
780-
> `opencode_cli` currently fails closed unless the installed OpenCode version is exactly `1.18.33`, the version whose configuration precedence and deny-all semantics are verified by this release.
803+
> `opencode_cli` currently fails closed unless the installed OpenCode version is one of the individually verified releases (`1.18.31`, `1.18.32`, `1.18.33`, `1.18.34`, `1.18.35`, `1.19.0`, `1.19.1`, `1.19.2`, `1.19.3`, `1.19.4`), whose configuration precedence and deny-all semantics are verified by this release; every other version, including prereleases, still fails closed.
781804
>
782-
> `copilot_cli` currently fails closed unless the installed Copilot CLI version is exactly `1.0.103`, the version whose tool-deny behavior is verified by this release.
805+
> `copilot_cli` currently fails closed unless the installed Copilot CLI version is exactly `1.0.105`, the version whose tool-deny behavior is verified by this release.
783806
>
784807
> Residual: Copilot CLI falls back to `gh auth token` when no other credential is available, so a stored gh login can still reach the child. This is inherent to Copilot auth.
785808
@@ -984,6 +1007,10 @@ SC4 uses the [OSV.dev](https://osv.dev) API to check dependencies against the fu
9841007
- **Batch queries** — all dependencies are checked in a single HTTP call.
9851008
- **Automatic fallback** — if OSV.dev is unreachable (air-gapped/offline), a small built-in fallback list is used.
9861009
- **Caching** — results are cached in-memory for 1 hour to avoid redundant API calls during a session.
1010+
- **Pipenv** — reads `Pipfile` package tables and the direct/transitive packages in
1011+
`Pipfile.lock`, including development and custom categories. Exact lock versions
1012+
can resolve unpinned manifest dependencies. Malformed entries and unsupported
1013+
VCS/local sources are reported as incomplete dependency checks.
9871014

9881015
The tool requires outbound HTTPS access to `api.osv.dev` for live vulnerability data. When that is not available, findings are limited to the static fallback list.
9891016

‎docs/DEVELOPMENT.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ Copy [.env.example](../.env.example) to `.env` in the project root and set value
310310
| `AZURE_OPENAI_ENDPOINT` | Azure resource endpoint. | `https://example.openai.azure.com/` |
311311
| `SKILLSPECTOR_COMPAT_API_KEY` | Credential for `SKILLSPECTOR_PROVIDER=openai_compatible`. | `...` |
312312
| `SKILLSPECTOR_COMPAT_BASE_URL` | OpenAI-compatible endpoint base URL. | `https://api.groq.com/openai/v1` |
313+
| `SKILLSPECTOR_COMPAT_HEADERS` | Optional JSON object with string header names and values for `openai_compatible`. Applies to sync and async requests; unset or blank adds no headers. Invalid configuration is rejected without exposing header values. May contain gateway API keys, so treat it as a secret. | `{"X-Tenant-ID":"my-tenant","X-API-Key":"gateway-key"}` |
313314
| `SKILLSPECTOR_MODEL` | Override the active provider's bundled default model (see [README.md](../README.md) for per-provider defaults). CLI providers forward it as `--model`. | `gpt-5.2` |
314315

315316
> **Disabled provider:** `codex_cli` remains registered for compatibility but refuses inference until a complete no-tools policy is verified.
@@ -349,9 +350,9 @@ Base URL env vars are not needed for live provider tests; the tests intentionall
349350
- `openai_compatible/` — generic compatible endpoint (`SKILLSPECTOR_COMPAT_API_KEY`, `SKILLSPECTOR_COMPAT_BASE_URL`)
350351
- `claude_cli/` — **local `claude` binary; no API key**. Uses the CLI's own auth session (`claude auth login`). Set `SKILLSPECTOR_PROVIDER=claude_cli`.
351352
- `codex_cli/` — **registered but disabled**. Its read-only sandbox permits host-file reads. Select an HTTP API provider or another supported CLI provider for LLM analysis.
352-
- `copilot_cli/` — **local `copilot` 1.0.103 binary; no API key**. Uses the CLI's own auth session (`copilot login`) or token env, stdin prompt transport, deny-all tool posture; fails closed on every other runtime version. Set `SKILLSPECTOR_PROVIDER=copilot_cli`.
353+
- `copilot_cli/` — **local `copilot` 1.0.105 binary; no API key**. Uses the CLI's own auth session (`copilot login`) or token env, stdin prompt transport, deny-all tool posture; fails closed on every other runtime version. Set `SKILLSPECTOR_PROVIDER=copilot_cli`.
353354
- `gemini_cli/` — **local `gemini` binary; no API key**. Uses the CLI's own auth session. Set `SKILLSPECTOR_PROVIDER=gemini_cli`.
354-
- `opencode_cli/` — **local `opencode` 1.18.33 binary; no API key**. Uses the CLI's own auth session (`opencode auth login`) and fails closed on every other runtime version because the deny-all policy is verified against that exact release. Set `SKILLSPECTOR_PROVIDER=opencode_cli`.
355+
- `opencode_cli/` — **local `opencode` (verified 1.18.31–1.18.35, 1.19.0–1.19.4) binary; no API key**. Uses the CLI's own auth session (`opencode auth login`) and fails closed on every other runtime version, including prereleases, because the deny-all policy is verified against those exact releases. Set `SKILLSPECTOR_PROVIDER=opencode_cli`.
355356

356357
CLI providers (`claude_cli`, `copilot_cli`, `gemini_cli`, `opencode_cli`) implement the optional `AgentCLICapable` interface (`is_available()` + `complete()`) defined in [providers/base.py](../src/skillspector/providers/base.py). `has_cli_capability(provider)` detects this at runtime. All subprocess calls go through the hardened helper [providers/_agent_cli.py](../src/skillspector/providers/_agent_cli.py) which enforces: no shell (`shell=False`), untrusted content via stdin only, capability stripping (tools disabled / sandboxed), environment scrubbing (no API keys forwarded), per-call timeout, and fail-closed error handling.
357358

‎docs/release/skillspector-2.12.0.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ The candidate also includes the previously pending Markdown-reference and runtim
5252

5353
## Changed
5454

55+
- Keep referenced targets that exist but are outside the inspected inventory as `referenced_uninspected` coverage caveats; only targets proven absent are reported as `reference_missing` ([#805](https://github.com/NVIDIA/SkillSpector/pull/805)).
5556
- Expand GPT-family context/output-budget entries in the OpenAI and Azure registries, including correction of the OpenAI GPT-5.4 context entry. These are metadata changes only: default models and API adapters are unchanged, and Responses-only model entries do not establish compatibility with another API ([#539](https://github.com/NVIDIA/SkillSpector/pull/539)).
5657
- JSON findings retain each occurrence's own zero-based columns; SARIF emits one-based Unicode-codepoint columns for active and suppressed findings. Unknown occurrence columns remain unknown rather than inheriting another occurrence's location ([#584](https://github.com/NVIDIA/SkillSpector/pull/584)).
5758
- GHSA/OSV `MODERATE` severity maps to `MEDIUM`, correcting the previous `LOW` fallback and potentially increasing affected supply-chain risk scores ([#588](https://github.com/NVIDIA/SkillSpector/pull/588)).

‎docs/scan-completeness.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ Fatal execution failure takes precedence and exits 2 regardless of strict flags.
131131

132132
JSON and MCP expose `analysis_completeness.status`, `is_complete`, `ledger_exceptions`, `scope_exclusions`, `analyzer_statuses`, and `limitations`, as well as `execution_successful`. Exceptions include reason, message, path, fatality, available source lines, and applicable limit metrics. Terminal and Markdown reports show these projections; SARIF uses invocation completeness and notifications. The report raises an otherwise `SAFE` recommendation to `CAUTION` for incomplete analysis while retaining the actual score and severity.
133133

134+
If every ledger exception is `reference_missing` and no files, analyzers, or other scan work are incomplete, the report uses `complete_with_caveats` with `is_complete=true`. Missing references remain visible in the reference and exception details, but do not make `--fail-on-incomplete` fail or change an otherwise `SAFE` recommendation. Ambiguous references and any actual coverage gap remain incomplete.
135+
134136
A subtlety is that component coverage can still read **100%** for AE6: analyzer work completed on each file, while a separate system event records unresolved interpretation. Consumers must use `is_complete` and the ledger, not the coverage percentage alone. No new telemetry platform is needed to explain these decisions; the existing public fields distinguish the causes.
135137

136138
## Review critique and remaining limits

‎pyproject.toml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version = "2.12.0"
88
description = "SkillSpector: Security scanner for AI agent skills (Claude Code, Cursor, and similar). Scans skills for vulnerabilities, malicious patterns, and security risks before installation. Supports Git repos, URLs, zips, and local directories; runs static pattern checks and optional LLM semantic analysis; outputs terminal, JSON, and Markdown reports with risk scoring."
99
readme = "README.md"
1010
license = "Apache-2.0"
11-
requires-python = ">=3.12,<3.15"
11+
requires-python = ">=3.12,<3.16"
1212
keywords = [
1313
"security",
1414
"ai-agents",
@@ -26,6 +26,7 @@ classifiers = [
2626
"Programming Language :: Python :: 3.12",
2727
"Programming Language :: Python :: 3.13",
2828
"Programming Language :: Python :: 3.14",
29+
"Programming Language :: Python :: 3.15",
2930
"Topic :: Security",
3031
"Topic :: Software Development :: Quality Assurance",
3132
]
@@ -73,7 +74,7 @@ dev = [
7374
]
7475

7576
[project.scripts]
76-
skillspector = "skillspector.cli:app"
77+
skillspector = "skillspector.cli_entry:app"
7778

7879
[tool.uv]
7980
# Enable `uv tool install git+https://github.com/NVIDIA/skillspector.git`

‎src/skillspector/artifacts.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,9 @@ def check_progress(position: int) -> None:
691691

692692
def _security_skeleton_piece(character: str) -> str:
693693
"""Return the case-folded NFKC/confusable skeleton for one source character."""
694+
# NFKC and the pinned confusable map leave ASCII unchanged.
695+
if character.isascii():
696+
return character.lower()
694697
folded = (
695698
unicodedata.normalize("NFKC", character).translate(ASCII_CONFUSABLE_SKELETON).casefold()
696699
)
@@ -702,6 +705,8 @@ def _security_skeleton_piece(character: str) -> str:
702705

703706
def _fold_security_character(character: str) -> str:
704707
"""Return a one-letter ASCII security skeleton, or an empty sentinel."""
708+
if character.isascii():
709+
return character.lower() if len(character) == 1 and character.isalpha() else ""
705710
folded = _security_skeleton_piece(character)
706711
return folded if len(folded) == 1 and folded.isascii() and folded.isalpha() else ""
707712

0 commit comments

Comments
 (0)