threat-ci

threat-ci is a command for coding agents from threatcl/claude-plugin. It costs 27 tokens per session (2,646 once invoked), scanned A, original, MIT.

A command that creates CI/CD configuration for Threatcl, a tool for validating threat-model files and checking security policies. It can target GitHub Actions, GitLab CI, pre-commit checks, or pull-request threat-model drift reviews.

In plain words
What is it for?
Use it to scaffold Threatcl checks in a repository or add pull-request checks that detect differences between recent code changes and the documented threat model.
Why use it?
It helps run security checks automatically when code changes, while preserving existing CI configuration and requiring the appropriate authentication setup.

Command

Part of the threatcl-cloud plugin — 1 skill, 5 commands, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/threatcl/claude-plugin/threat-ci
Clone the repo
git clone --depth 1 https://github.com/threatcl/claude-plugin

Or install threatcl-cloud, the plugin that ships this one along with the rest of its 1 skill, 5 commands, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for threat-ci

README.md
[![agentmods](https://agentmods.dev/badge/commands/threatcl/claude-plugin/threat-ci.svg)](https://agentmods.dev/commands/threatcl/claude-plugin/threat-ci)
Your own site
<a href="https://agentmods.dev/commands/threatcl/claude-plugin/threat-ci"><img src="https://agentmods.dev/badge/commands/threatcl/claude-plugin/threat-ci.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,646 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.02646
Opus 5 $0.00014 $0.01323
Sonnet 5 $0.00005 $0.00529
Haiku 4.5 $0.00003 $0.00265

Measured 5d ago against content hash e1b16d0a7336, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

threat-ci scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/threat-ci.md · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are scaffolding CI integration for Threatcl. The flavor is $ARGUMENTS — one of: github-actions, gitlab-ci, pre-commit, drift. If the argument is empty, ask the user which flavor and stop.

The first three flavors scaffold Threatcl Cloud validation and policy evaluation. The drift flavor scaffolds threatcl/drift-action, which reviews each PR for threat-model drift — it needs no Threatcl Cloud account and uses a different auth model. They're complementary: a repo can run both.

Before generating anything, scan the repo for existing CI config (.github/workflows/, .gitlab-ci.yml, .pre-commit-config.yaml, .github/workflows/threat-drift.yml, .threatcl-ci.hcl) and prefer to extend those rather than overwrite. If a Threatcl-related file already exists, show the user the diff before writing.

Auth in CI

For the Threatcl Cloud flavors (github-actions, gitlab-ci, pre-commit), CI authenticates via API tokens, not the OAuth/device flow. Those scaffolds must:

  • Reference a secret named THREATCL_API_TOKEN (the user creates it in the Threatcl Cloud UI and stores it as a CI secret)
  • Set THREATCL_API_URL to the org's API endpoint (currently https://beta-api.threatcl.com; document this)
  • Optionally set THREATCL_CLOUD_ORG to pin the org

The drift flavor does not use THREATCL_API_TOKEN. drift-action is self-hosted: your code and threat model go only to the LLM provider you configure, under your own key, never to Threatcl. Its secret is ANTHROPIC_API_KEY (or OPENAI_API_KEY).

What each flavor produces

github-actions

Write .github/workflows/threatcl.yml with two jobs:

  1. validate (on pull_request) — checks out the repo, installs the threatcl CLI, runs threatcl cloud validate on every *.hcl file changed in the PR. Fails the job on any validation error.
  2. policy-evaluate (on push to main or pull_request if the user prefers) — for each pushed model, run threatcl cloud policy evaluate -model-id <id> -fail-on-error. The model IDs come from the backend block in each HCL file — parse it. The backend block carries organization and threatmodel only; never emit a segment attribute, which was removed in spec 0.6.0 and is now an "Unsupported argument" parse error.

Read the full file on GitHub · 174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 174 lines · 27 tokens per session scan A e1b16d0a7336

Subscribe to this mod's changes

threat-ci is a command published in the GitHub repository threatcl/claude-plugin (4 stars, last pushed 21d ago), licensed MIT. It adds 27 tokens to every session and 2,646 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.