feat: deterministic supply-chain threat-model generator (v0.1)#120
Merged
1 commit merged intoJun 2, 2026
Merged
Conversation
Add scripts/generate_supply_chain_threat_model.py: an offline, stdlib-only, deterministic static analyser for x.klickd candidate manifests. Classifies declared threats across 11 categories (authority_escalation, human_veto_bypass, tool_boundary_violation, memory_poisoning, private_public_leak, evidence_weakening, unsourced_claim, unsafe_external_action, irreversible_action, compliance_overclaim, stale_or_unlicensed_source_dependency), emits required mitigations, and blocks (exit 1) on unmitigated high/critical findings. Adds 7 candidate fixtures, a 14-case pytest suite, and an internal/draft doc. NON-NORMATIVE: not a security certification, no GDPR/EU AI Act compliance claim, no benchmark/universal-standard claim, no release. Public artefacts remain v4.1. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a real, deterministic, offline supply-chain threat-model generator for x.klickd skill/candidate manifests. Independent PR built on
main; does not depend on or merge #115–#118.scripts/generate_supply_chain_threat_model.py— stdlib-only CLI. Parses a candidate manifest, computes a deterministiccandidate_hash, classifies threats, emits required mitigations, renders a deterministic report, and blocks (exit 1) on any unmitigatedhigh/criticalfinding.tests/fixtures/threat-model/.tests/test_supply_chain_threat_model.py.docs/supply-chain/THREAT_MODEL_GENERATOR.md.Tool-backed (real)
Manifest parsing · deterministic sha256 candidate hash + threat-model id · rule-based classification across 11 categories (
authority_escalation,human_veto_bypass,tool_boundary_violation,memory_poisoning,private_public_leak,evidence_weakening,unsourced_claim,unsafe_external_action,irreversible_action,compliance_overclaim,stale_or_unlicensed_source_dependency) · severity (low/medium/high/critical) · required_mitigations · block decision · deterministic report rendering · fixture-driven tests.Planned / out of scope
Runtime/behavioural analysis of a loaded candidate · network scanning · legal/compliance assessment · promotion-gate integration · richer source freshness/license resolution (separate PR, not depended on here).
Blocking examples
Validations run
hash-wasmoptional dep, baseline).Limits & boundaries
NON-NORMATIVE. Not a security certification; does not establish GDPR or EU AI Act compliance; no benchmark-superiority / universal-standard claim; does not prove a loaded/executable skill; not full automation. Findings reflect only what the manifest declares. Human review still required.
No release / no publish / no tag / no deploy / no DOI. Public artefacts remain v4.1.
Davincc77/klickd-aiuntouched.Test plan
python3 -m pytest tests/test_supply_chain_threat_model.py -qpython3 scripts/generate_supply_chain_threat_model.py --candidate tests/fixtures/threat-model/candidate_no_veto_sensitive_action.json→ exit 1python3 scripts/generate_supply_chain_threat_model.py --candidate tests/fixtures/threat-model/candidate_low_risk_ok.json→ exit 0🤖 Generated with Claude Code