alexgreensh/repo-forensics / skills/repo-forensics
repo-forensics
FlaggedSecurity forensics for git repos, AI skills, and MCP servers. Audits dependencies, detects prompt injection, credential theft, runtime dynamism, manifest drift, known CVEs, CISA KEV (actively exploited) vulns, and 2026 attack patterns. Not for fixing vulnerabilities or pentesting.
tests/test_manifest_signature.py
View on GitHub"""Tests for the checksums.json signature check in verify_install."""
import shutil
from scripts.verify_install import verify_manifest_signature
import os
SKILL_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def _stage(tmp_path):
"""Copy the scripts plus manifest/signature pair into a temp skill root."""
shutil.copytree(os.path.join(SKILL_ROOT, "scripts"), tmp_path / "scripts")
for name in ("checksums.json", "checksums.json.sig"):
shutil.copy(os.path.join(SKILL_ROOT, name), tmp_path / name)
return tmp_path
def test_shipped_manifest_signature_verifies():
"""The manifest committed to this repo must be signed by the release key."""
passed, message = verify_manifest_signature(SKILL_ROOT)
assert passed, message
def test_regenerated_but_unsigned_manifest_fails(tmp_path):
"""A manifest whose bytes changed without re-signing must not verify."""
root = _stage(tmp_path)
manifest = root / "checksums.json"
manifest.write_text(manifest.read_text(encoding="utf-8") + "\n", encoding="utf-8")
passed, message = verify_manifest_signature(str(root))
assert not passed
assert "signature does not verify" in message
def test_missing_signature_fails(tmp_path):
"""An absent signature file is a failure, never a pass."""
root = _stage(tmp_path)
(root / "checksums.json.sig").unlink()
passed, message = verify_manifest_signature(str(root))
assert not passed
assert "missing" in message
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |