Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit ada6c1a

Browse files
authored
fix: remediate scanner security alerts (#41)
* fix: remediate scanner security alerts Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com> * fix: address PR review feedback Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com> --------- Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com>
1 parent f1757d7 commit ada6c1a

8 files changed

Lines changed: 155 additions & 134 deletions

File tree

.clusterfuzzlite/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM gcr.io/oss-fuzz-base/base-builder-python
1+
FROM gcr.io/oss-fuzz-base/base-builder-python@sha256:721650302bfda2f3832df73bb24aeacfa41c32e692f3d6e4dd06074e79c64ed7
22

33
COPY ./.clusterfuzzlite/requirements-atheris.txt $SRC/requirements-atheris.txt
4-
RUN python3 -m pip install --no-cache-dir --no-binary=:all: --no-deps \
4+
RUN python3 -m pip install --require-hashes --no-cache-dir --no-binary=:all: --no-deps \
55
-r $SRC/requirements-atheris.txt
66

77
COPY . $SRC/codex-plugin-scanner

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ Cisco-backed skill scanning is optional:
6565
pip install "codex-plugin-scanner[cisco]"
6666
```
6767

68+
The `cisco` extra is pinned to a patched `hashgraph-online/skill-scanner` fork while the upstream Cisco release still carries a vulnerable LiteLLM pin.
69+
6870
You can also run the scanner without a local install:
6971

7072
```bash

action/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This README is intentionally root-ready for a dedicated GitHub Marketplace actio
3535
| `fail_on_severity` | Fail on findings at or above this severity: `none`, `critical`, `high`, `medium`, `low`, `info` | `none` |
3636
| `cisco_skill_scan` | Cisco skill-scanner mode: `auto`, `on`, `off` | `auto` |
3737
| `cisco_policy` | Cisco policy preset: `permissive`, `balanced`, `strict` | `balanced` |
38-
| `install_cisco` | Install the Cisco skill-scanner dependency for live skill scanning | `false` |
38+
| `install_cisco` | Install the Cisco skill-scanner dependency from the pinned patched fork used by this repo | `false` |
3939
| `submission_enabled` | Open submission issues for awesome-list and registry automation when the plugin clears the submission threshold | `false` |
4040
| `submission_score_threshold` | Minimum score required before a submission issue is created | `80` |
4141
| `submission_repos` | Comma-separated GitHub repositories that should receive the submission issue | `hashgraph-online/awesome-codex-plugins` |
@@ -115,6 +115,7 @@ jobs:
115115
cisco_policy: strict
116116
install_cisco: true
117117
```
118+
The action installs the Cisco scanner from the same pinned patched fork used in the main scanner repo until upstream publishes a fixed LiteLLM dependency.
118119

119120
### Export registry payload for Codex ecosystem automation
120121

action/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ inputs:
6868
required: false
6969
default: "balanced"
7070
install_cisco:
71-
description: "Install the Cisco skill-scanner dependency for live skill scanning"
71+
description: "Install the Cisco skill-scanner dependency from the pinned patched fork used by this repo"
7272
required: false
7373
default: "false"
7474
submission_enabled:
@@ -183,7 +183,8 @@ runs:
183183
fi
184184
185185
if [ "${{ inputs.install_cisco }}" = "true" ]; then
186-
pip install "cisco-ai-skill-scanner>=2.0.6,<3"
186+
# Temporary fork pin until upstream cisco-ai-skill-scanner ships a LiteLLM fix.
187+
pip install "cisco-ai-skill-scanner @ git+https://github.com/hashgraph-online/skill-scanner.git@9b0ea08111f9129abfdf7aedc47322615cda1164"
187188
fi
188189
189190
- name: Run scanner

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ dependencies = [
3232

3333
[project.optional-dependencies]
3434
cisco = [
35-
"cisco-ai-skill-scanner>=2.0.6,<3",
35+
# Temporary fork pin until upstream cisco-ai-skill-scanner ships a LiteLLM fix.
36+
"cisco-ai-skill-scanner @ git+https://github.com/hashgraph-online/skill-scanner.git@9b0ea08111f9129abfdf7aedc47322615cda1164",
3637
]
3738
dev = [
3839
"build>=1.2.2",
@@ -55,6 +56,9 @@ Homepage = "https://github.com/hashgraph-online/codex-plugin-scanner"
5556
Repository = "https://github.com/hashgraph-online/codex-plugin-scanner"
5657
Issues = "https://github.com/hashgraph-online/codex-plugin-scanner/issues"
5758

59+
[tool.hatch.metadata]
60+
allow-direct-references = true
61+
5862
[tool.ruff]
5963
target-version = "py310"
6064
line-length = 120

tests/test_action_bundle.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ def test_action_metadata_includes_marketplace_branding_and_fallback_install() ->
1515
assert "actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405" in action_text
1616
assert "pip install codex-plugin-scanner" in action_text
1717
assert 'pip install "$LOCAL_SOURCE"' in action_text
18+
assert (
19+
'pip install "cisco-ai-skill-scanner @ '
20+
'git+https://github.com/hashgraph-online/skill-scanner.git@9b0ea08111f9129abfdf7aedc47322615cda1164"'
21+
in action_text
22+
)
1823
assert "write_step_summary:" in action_text
1924
assert "profile:" in action_text
2025
assert "config:" in action_text
@@ -103,6 +108,7 @@ def test_action_bundle_docs_live_in_action_readme() -> None:
103108
assert "awesome-codex-plugins" in action_readme
104109
assert "publish-action-repo.yml" in action_readme
105110
assert "actions/github-script@v8" in action_readme
111+
assert "pinned patched fork" in action_readme
106112

107113

108114
def test_readme_uses_stable_apache_license_badge() -> None:

tests/test_skill_security.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ def test_skill_security_auto_mode_unavailable_is_not_applicable(monkeypatch):
9090
assert availability.applicable is False
9191

9292

93+
def test_run_cisco_skill_scan_on_mode_requires_cisco_dependency_when_missing(monkeypatch):
94+
monkeypatch.setitem(sys.modules, "skill_scanner", ModuleType("skill_scanner"))
95+
monkeypatch.delitem(sys.modules, "skill_scanner.core", raising=False)
96+
monkeypatch.delitem(sys.modules, "skill_scanner.core.scan_policy", raising=False)
97+
98+
summary = run_cisco_skill_scan(FIXTURES / "good-plugin" / "skills", mode="on", policy_name="balanced")
99+
100+
assert summary.status == CiscoIntegrationStatus.UNAVAILABLE
101+
assert "Install with the cisco extra." in summary.message
102+
103+
93104
def test_scan_plugin_includes_cisco_findings(monkeypatch):
94105
monkeypatch.setattr(
95106
"codex_plugin_scanner.checks.skill_security.run_cisco_skill_scan",

0 commit comments

Comments
 (0)