Catch Prompt-Injection & P2S Paths in Autonomous GitHub CI Agents.
Moving github.event.* into an
env: variable clears shell-injection
linters while leaving AI prompts vulnerable.
AgentFence traces untrusted payloads
across expressions, step outputs, and
.mcp.json
configs before agent runs execute.
Also available under TensorJetAI scope:
npx @tensorjetai/agentfence --format text .
Unvetted issue comment assigned to env.ISSUE_BODY to pass shell-injection linters.
AST taint tracking follows tainted env bindings into anthropics/claude-code-action.
Agent runs with repository write permissions on open contributor input.
Why Standard SAST and CI Linters Miss Agentic Workflow Injections
AgentFence complements zizmor,
actionlint, and CodeQL. Generic CI linters check
shell quoting—so moving issue.body into
an intermediate env: clears their alerts
while leaving the AI prompt and P2S
shell sinks exposed.
Untrusted Prompt Taint
An external contributor submits an issue or PR body. Even when passed via
env: or reusable inputs, tainted
text reaches privileged AI agent prompts.
Prompt-to-Script (P2S)
Unvalidated agent output is interpolated directly into a runner shell step (run: gh ... "${{ steps.gemini.outputs.summary }}") without structured allowlisting.
Privileged Fork Checkout
Workflows triggered by
pull_request_target checking out
contributor head.sha inside a job
carrying write scopes or secrets.
Secret Exposure & MCP Configs
Secrets exposed where untrusted data influences an agent (AF006), or .mcp.json / settings running
unpinned npx servers (AF007).
Deterministic AST Parsing — 100% Runner-Local Execution
No probabilistic LLM scanner watching your LLM. AgentFence is pure deterministic static analysis running inside your local terminal or CI runner—zero workflow files or prompts leave your environment.
YAML, gh-aw & MCP Parsing
Parses GitHub Actions (.github/workflows/*.yml), Agentic Workflows (gh-aw), and
.mcp.json configs without executing
any code.
Symbolic Taint Graph
Traces untrusted event sources (issue.body, comment.body) across
env:, reusable workflows, composite
actions, and step outputs.
Capability & Gate Policy
Evaluates trust predicates, job permissions, secrets exposure, and allowed agent
tools (Bash,
Edit, write scopes) per provider
profile.
Runner-Local SARIF & Gate
Executes completely offline in your terminal or GitHub runner with zero network
calls, emitting SARIF 2.1.0, JSON, or
human-readable traces.
Modeled Agent Actions & Configuration Surfaces
Provider-aware taint rules across all six major GitHub agent workflows plus MCP configs.
Exhaustive Agent CI Guardrail Catalog (AF001–AF007)
Every rule in AgentFence corresponds to an audited source-to-sink vulnerability condition in workflow ASTs. All rules can be suppressed with reviewed justification using inline comments.
| Rule ID | Severity | Vulnerability Vector | AST Trigger Condition | Default CI Action |
|---|---|---|---|---|
| AF001 | Critical |
Untrusted Prompt Injection Sink
Untrusted event/repo data reaches privileged agent prompt (directly or via
env:/outputs).
|
github.event.* →
env / prompt +
privileged action
|
Blocks (Exit 1) |
| AF002 | Critical |
Prompt-to-Script (P2S)
Recognized agent output reaches shell execution without structured
allowlisting.
|
steps.agent.outputs.* →
run: bash/sh
|
Blocks (Exit 1) |
| AF003 | Critical |
Fork Checkout in Privileged Job
Contributor-controlled checkout enters a privileged pull_request_target job.
|
pull_request_target +
checkout head.sha
|
Blocks (Exit 1) |
| AF004 | High |
Unvetted Public Agent Trigger
Public trigger starts agent without actor, label, approval, or environment
gate.
|
on: [issues, comments] without
trust gate
|
CLI Fails / Hosted Warns |
| AF005 | High |
Broad Write Permissions
Agent job receives broad write permissions instead of minimal read scopes.
|
permissions: write-all / contents: write
|
CLI Fails / Diff Emitted |
| AF006 | Critical |
Secret in Untrusted Agent Stage
Secret is available where untrusted data influences agent behavior.
|
secrets.* exposed to agent with tainted
flow
|
Blocks (Exit 1) |
| AF007 | Med / High |
Risky MCP / Settings Config
.mcp.json / .claude / .gemini runs unpinned npx/uvx or broad tool approvals.
|
.mcp.json unpinned package or wildcard
approval
|
CLI Fails / Pin Config |
# agentfence-ignore: AF001 -- reviewed input boundary
Runner-Local CLI. Predictable Commercial Licensing.
Audit workflows locally with our free Apache-2.0 CLI and GitHub Action. Upgrade via Paddle to unlock offline baseline regression diffing, SHA-256 attestations, and governance reports inside the commercial Docker runner.
Apache 2.0 Linter
For individual developers and open source maintainers auditing workflow YAML and MCP configs in local runs or GitHub Actions.
Pro CI Gate
Adopt strict PR blocking today without fixing legacy workflows first: offline-verified baseline diffing and SHA-256 attestations on your own runner.
Team Governance
For security and platform teams standardizing audit-ready Markdown governance reports and baseline gating across repositories.
Live checkout calls TensorJet central Paddle billing (tensorjetai.com/api/billing/checkout) with signed billingRef verification and emails an
offline Ed25519 tj_lic_ key (AGENTFENCE_LICENSE_KEY).
100% self-serve licensing with async email support — no mandatory sales calls, no cloud repo access, and no source upload. Building an AppSec or CI platform? Email security@tensorjetai.com for OEM embedding.
Add AgentFence to Your Workflow
Start free with the Apache-2.0 CLI & GitHub Action, or run the commercial Docker image in CI with an offline-verified TensorJet license key.
$ npx agentfence-cli --format sarif . > agentfence.sarif
# Or scoped package: npx @tensorjetai/agentfence --format text .
$ docker run --rm -v "$PWD:/work" -w /work \
-e AGENTFENCE_LICENSE_KEY="tj_lic_..." \
registry.tensorjetai.com/agentfence-commercial:0.1.2 \
scan .github/workflows --baseline .agentfence-baseline.json --attest .agentfence-attest.json
Offline Ed25519 License Verification — Zero Egress in CI
Checkout via TensorJet billing issues a signed
tj_lic_ token verified offline inside the
container using TensorJet's pinned Ed25519 public key. No telemetry, no
external license server callbacks, and zero source-code upload.
tj_lic_ status exit codes
cleanly for CI gates.