Skip to main content
Glama
evidiq

EVIDIQ Bastion

Official
by evidiq

基础设施即代码和部署配置定义了自主代理服务的安全边界。一个被配置为以 root 运行容器工作负载、暴露 0.0.0.0/0 入站规则、使用未固定的 GitHub Actions 或挂载主机网络路径的代理服务,会在任何代码执行之前引入直接的集群沦陷风险。

EVIDIQ Bastion 是基础设施配置的部署前安全门禁。
将 Dockerfiles、GitHub Actions CI 工作流、Kubernetes 清单或 Terraform HCL / Compose 文件传递给它。它会评估 14 条确定性安全规则——强制执行非 root 执行、凭据隔离、供应链完整性、资源边界和签名证明。

Bastion 从不部署基础设施,从不执行输入清单,也绝不接受私钥。

它能做什么

  • 非 root 执行强制 — 检测容器构建中的 root 用户执行(USER root 或缺少非 root 的 USER 指令)。

  • 供应链操作固定 — 强制 GitHub Actions 使用完整的 40 位提交 SHA 固定(阻止可变的 @v3 / @main 标签),并强制 Docker 基础镜像使用不可变的 SHA-256 摘要。

  • 凭据隔离 — 检测构建 ARG/ENV 指令中硬编码的机密、API 密钥或私钥,IaC 变量默认值中的明文,以及 Kubernetes 机密环境变量。

  • Kubernetes 工作负载加固 — 识别特权容器(privileged: true)、hostPath 卷挂载、hostNetwork 暴露以及缺少 CPU/内存资源限制。

  • IaC 暴露审计 — 审计 Terraform HCL 和 Docker Compose,检查开放的世界入站规则(0.0.0.0/0)、公共 S3 存储桶以及不受限制的容器能力。

  • CI/CD 管道攻击向量 — 检测 pull_request_target 触发器中的不可信代码检出风险、run 步骤中未转义的 github.event 表达式注入,以及过于宽泛的 permissions: write-all

  • 签名证明attest_deployment 将配置摘要、评估结果和裁决绑定到 EIP-191 签名证明中,并将其锚定在 0G 存储上。

  • 确定性裁决 — 任何 blocker 失败都会产生 BLOCK;否则任何 high 失败都会产生 REVIEW;干净的评估产生 PASS

  • 按次付费 — 五个付费分析工具,价格为 0.005–0.03 USDT0;五个预检和验证工具免费。

Related MCP server: supership-scan

何时使用 Bastion

在应用或部署基础设施代码之前使用 Bastion:在构建容器镜像之前、在合并 CI/CD 工作流拉取请求之前、在应用 Kubernetes 清单(kubectl apply)之前,或在执行 Terraform(terraform apply)之前。

切勿向其发送私钥——永远不要。不要将智能合约 calldata 路由到此(那是 Assay),源代码请用 Warden,端点可达性请用 Sentinel,依赖清单请用 Lineage,持久操作日志请用 Vault

一个自然的链路:validate_configscan_dockerfile / scan_workflowattest_deploymentappend_record(Vault)。

从任何代理使用它

# Read the public Skill document
curl -s https://mcp.evidiq.dev/bastion/skill.md

# Inspect current x402 pricing discovery
curl -s https://mcp.evidiq.dev/bastion/x402

# Connect the remote MCP server (OpenClaw)
openclaw mcp add evidiq-bastion --transport streamable-http --url https://mcp.evidiq.dev/bastion/mcp

# Connect the remote MCP server (Claude Code)
claude mcp add --transport http evidiq-bastion https://mcp.evidiq.dev/bastion/mcp

公共端点:

端点

用途

https://mcp.evidiq.dev/bastion/mcp

远程 Streamable HTTP MCP 传输

https://mcp.evidiq.dev/bastion/skill.md

面向代理的使用与安全指南

https://mcp.evidiq.dev/bastion/x402

x402 v2 定价与支付发现

https://mcp.evidiq.dev/bastion/health

服务健康状态与支付网关状态

https://evidiq.dev/docs/bastion

技术文档

MCP 工具

付费分析与证明

工具

费用

原子单位

描述

scan_dockerfile

0.005 USDT0

5000

审计 Dockerfile,检查 root 用户、未固定的基础镜像、构建阶段机密和 ADD 网址

scan_workflow

0.01 USDT0

10000

审计 GitHub Actions 工作流 YAML,检查未固定的操作、pull_request_target 风险和脚本注入

scan_manifest

0.015 USDT0

15000

审计 Kubernetes 清单,检查特权模式、hostPath/hostNetwork 和缺失的资源限制

scan_iac

0.02 USDT0

20000

审计 Terraform HCL 和 Docker Compose,检查 0.0.0.0/0 入站规则、公共存储桶和明文机密

attest_deployment

0.03 USDT0

30000

将部署配置摘要和裁决绑定到 EIP-191 签名证明中,并锚定在 0G 存储上

免费预检与验证

工具

费用

描述

bastion_capabilities

免费

规则目录,包含严重级别、支持的配置类型、限制、完整定价和工具列表

validate_config

免费

免费预检解析检查:自动检测配置类型,计算 SHA-256 摘要,检查输入中的机密,并报告严重级别计数

estimate_cost

免费

价格查询工具;不带参数时,提供完整定价表

verify_bastion_report

免费

离线 SHA-256 内容摘要和 EIP-191 签名验证器

get_artifact

免费

通过 artifactId 检索存储的报告或证明(10 分钟 TTL)

测试验证与自动化测试工具输出

EVIDIQ Bastion 中的每条规则和支付门禁都通过 VPS 上的自动化测试工具(tester/harness.mjs)进行验证。

1. 自动化测试工具夹具矩阵(14/14 通过)

夹具

工具

预期裁决

实际裁决

集合等值匹配

dockerfile/root-user.Dockerfile

scan_dockerfile

BLOCK

BLOCK

true (BASTION_ROOT_USER)

dockerfile/latest-tag.Dockerfile

scan_dockerfile

REVIEW

REVIEW

true (BASTION_UNPINNED_BASE)

dockerfile/secret-in-arg.Dockerfile

scan_dockerfile

BLOCK

BLOCK

true (BASTION_SECRET_IN_BUILD_ARG)

dockerfile/clean.Dockerfile

scan_dockerfile

PASS

PASS

true (Clean)

workflow/pr-target-checkout.yml

scan_workflow

BLOCK

BLOCK

true (BASTION_PR_TARGET_UNTRUSTED)

workflow/unpinned-action.yml

scan_workflow

REVIEW

REVIEW

true (BASTION_ACTION_NOT_PINNED)

workflow/script-injection.yml

scan_workflow

BLOCK

BLOCK

true (BASTION_EXPR_INJECTION)

workflow/clean.yml

scan_workflow

PASS

PASS

true (Clean)

manifest/privileged.yaml

scan_manifest

BLOCK

BLOCK

true (BASTION_PRIVILEGED)

manifest/no-limits.yaml

scan_manifest

REVIEW

REVIEW

true (BASTION_NO_RESOURCE_LIMITS)

manifest/helm-templated.yaml

scan_manifest

REVIEW

REVIEW

true (Clean template)

iac/open-ingress.tf

scan_iac

BLOCK

BLOCK

true (BASTION_WORLD_INGRESS)

iac/plaintext-secret.tf

scan_iac

BLOCK

BLOCK

true (BASTION_PLAINTEXT_SECRET)

iac/clean.tf

scan_iac

PASS

PASS

true (Clean)

2. 验证工具日志(node tester/harness.mjs

=== Starting EVIDIQ Bastion MCP Test Harness ===
Test Container Endpoint: http://127.0.0.1:4012/mcp
Production Endpoint:     http://127.0.0.1:3012/mcp

--- Step 1: Verify Test Container Health & Bypass ---
  PASS: Test container health is 200 OK
  PASS: Test container carries bypass header 'x-x402-bypass: true'
  PASS: Test container response includes 'x402Bypass: true' in body

--- Step 2 & 3: Bare Call Sweep & Fixture Verification (14 Fixtures) ---
  PASS: 14/14 Fixture Assertions Passed with Exact Set-Equality Match

--- Step 4: Determinism & Digest Stability ---
  PASS: Repeated scan yields byte-identical SHA-256 digest: 274cd946dd164d373f6472ef66ab9d85450733f3c167dc4a066d25238a3eeeea

--- Step 5: Test Build Markers Check ---
  PASS: Response carries 'testBuild: true' marker

--- Step 6: Production Unpaid 402 Probes ---
  PASS: Production /health is 200 OK
  PASS: Production paymentGate is 'enforced'
  PASS: Production HEAD /mcp returns 402 Payment Required
  PASS: Production unpaid scan_dockerfile returns HTTP 402

=================================================
 SUCCESS: All EVIDIQ Bastion MCP test harness assertions PASSED!

3. OpenClaw 自主代理执行追踪

代理运行 1 — Dockerfile 审计(scan_dockerfile):

openclaw@evidiq-vps:~$ openclaw agent --session-id bastion-dockerfile-audit \
  --message "Use tool scan_dockerfile from evidiq-bastion MCP to audit: 'FROM node:22-alpine\nCMD [\"node\"]'" --local

[provider-transport-fetch] start provider=zerog model=glm-5.2 method=POST url=https://router-api.0g.ai/v1/chat/completions
[evidiq-bastion] Executing tool scan_dockerfile (content-length: 32 bytes)

## Dockerfile Audit Results
Verdict: 🚫 BLOCK (1 blocker finding)

Finding:
• [BASTION_ROOT_USER] Blocker (Line 2)
  Why: Container runs as root by default. A container escape gives root access on the host node.
  Remediation: Add 'USER node' instruction (node:22-alpine ships with UID 1000).

Report Integrity:
  Digest: 86e0124f52a23e277f9864190fcbff9
  Signer: 0x131E4A54aB221929834815c99195dAec316aC270
  Artifact ID: art_86e0124f52a23e27

代理运行 2 — GitHub Actions 工作流审计(scan_workflow):

openclaw@evidiq-vps:~$ openclaw agent --session-id bastion-workflow-audit \
  --message "Use tool scan_workflow from evidiq-bastion MCP to audit GitHub Actions workflow" --local

[provider-transport-fetch] start provider=zerog model=glm-5.2 method=POST url=https://router-api.0g.ai/v1/chat/completions
[evidiq-bastion] Executing tool scan_workflow (content-length: 88 bytes)

## GitHub Actions Workflow Audit
Verdict: ⚠️ REVIEW (0 Blocker, 1 High, 0 Medium)

Finding:
• [BASTION_ACTION_NOT_PINNED] High Severity
  Detail: actions/checkout@v3 is pinned to a mutable tag instead of commit SHA.
  Why: Mutable tags can be hijacked. Pinning to a SHA prevents untrusted action code updates.
  Remediation: Pin action to immutable 40-character commit SHA (e.g., actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11).

Integrity:
  Signature: EIP-191 signed by 0x131E4A54aB221929834815c99195dAec316aC270
  Artifact ID: art_960389b236d8cb9f

推荐工作流程

结算发生在付费工具运行之前,因此格式错误的参数仍算一次付费调用。请先免费预检:

  1. bastion_capabilities — 规则集目录、支持的配置类型、限制和价格。

  2. validate_config — 确认配置类型,检测输入中的机密,并返回严重级别计数,不收取费用。

  3. estimate_cost — 查询你打算执行的操作的准确价格。

  4. 每个请求一次付费调用(scan_dockerfilescan_workflowscan_manifestscan_iacattest_deployment)。

  5. verify_bastion_report — 免费离线验证签名和报告摘要。

规则族与裁决引擎

Bastion 在 6 个规则族中强制执行 14 条确定性安全规则:

  • 权限BASTION_ROOT_USER, BASTION_PRIVILEGED

  • 暴露面BASTION_WORLD_INGRESS, BASTION_PUBLIC_STORAGE, BASTION_HOST_NETWORK

  • 机密BASTION_SECRET_IN_BUILD_ARG, BASTION_PLAINTEXT_SECRET, BASTION_SECRET_ENV

  • 供应链BASTION_UNPINNED_BASE, BASTION_ACTION_NOT_PINNED, BASTION_PR_TARGET_UNTRUSTED, BASTION_EXPR_INJECTION

  • 资源BASTION_NO_RESOURCE_LIMITS

  • 卫生BASTION_ADD_URL, BASTION_UNPINNED_PKG_INSTALL

判定逻辑:

  • 违反任意 blocker 规则 → BLOCK

  • 违反任意 high 规则(0 个 blocker) → REVIEW

  • 评估干净(0 个阻断项、0 个高危发现) → PASS

报告证明了什么,以及不能证明什么

  • 确实证明:在确定性的 14 条规则引擎版本下评估的这份确切部署配置,产生了该内容摘要、发现集和判定结果。

  • 确实生成由 Bastion 可信密钥签名的 EIP-191 签名,可锚定在 0G 存储上。

  • 并不保证超出静态配置的运行期应用安全性。IaC 定义之外的动态应用漏洞或实时网络攻击不在静态作用域内。


架构

flowchart TB
    agent["<b>AI agent</b><br/>MCP client"]
    request{"Tool call<br/>free or paid?"}
    agent -->|POST /bastion/mcp| request

    free["Free preflight<br/>capabilities · validate_config<br/>estimate · verify · get_artifact"]
    gate["x402 v2 gate<br/>EIP-3009 exact · pay per config scan"]
    xlayer[("X Layer<br/>USD₮0 · eip155:196")]
    request -->|free helper| free
    request -->|paid config scan| gate
    gate -. verify and settle .-> xlayer

    subgraph bastion["EVIDIQ Bastion trust boundary"]
        direction TB
        parse["1. Config parser<br/>Dockerfile · YAML · HCL · manifest"]
        rules["2. 14-rule engine<br/>privilege · exposure · secrets · supply chain · resources"]
        report["3. Canonical report<br/>SHA-256 digest · EIP-191 signature"]
        artifacts["4. Content-addressed artifacts<br/>scan reports & attestations"]
        parse --> rules --> report --> artifacts
    end

    free --> parse
    gate --> parse

    response["<b>MCP response</b><br/>verdict + findings + attestation"]
    artifacts --> response

    classDef client fill:#312e81,stroke:#a78bfa,color:#ffffff,stroke-width:2px;
    classDef payment fill:#052e16,stroke:#4ade80,color:#ffffff,stroke-width:2px;
    classDef core fill:#0f172a,stroke:#38bdf8,color:#ffffff,stroke-width:2px;
    classDef output fill:#4c1d95,stroke:#c4b5fd,color:#ffffff,stroke-width:2px;
    class agent,request client;
    class free,gate,xlayer payment;
    class parse,rules,report,artifacts core;
    class response output;
    style bastion fill:#0f172a,stroke:#38bdf8,color:#e0f2fe,stroke-width:2px;

TypeScript SDK

实时端点的类型化客户端位于 sdk/index.ts 中 — 10 个工具(5 个免费,5 个付费)。免费工具直接响应裸调用;付费工具自动运行 x402 流程(402 挑战 → pay 钩子 → 携带 x-payment 头重放)。文件中不存有任何密钥。

import { BastionClient } from "./sdk/index.js";

const client = new BastionClient(); // endpoint defaults to https://mcp.evidiq.dev/bastion/mcp

// free
const caps = await client.callTool("bastion_capabilities", {});

// paid — settle the 402 challenge via the constructor's pay hook, or omit it
// to receive a PaymentRequiredError carrying the full x402 v2 challenge
const result = await client.callTool("some_paid_tool", { arg: "value" });

pay 钩子接收解码后的 x402 v2 挑战({ x402Version, resource, accepts[] } — payTo、asset、amount),并返回 x-payment 头的值,例如通过官方 OKX SDK 结算的 EIP-3009 transferWithAuthorization。如果没有钩子,付费调用会抛出 PaymentRequiredError,调用方可以用任其希望的方式结算。

许可证

EVIDIQ 拥有其原创 Bastion 代码的所有权,并以 MIT 许可证进行授权。第三方依赖在 THIRD_PARTY_NOTICES.md 中保留各自的开源许可证。

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Security co-pilot for AI agents. Scans for vulnerabilities like prompt injection, infinite loops, and token bombing in AI Agents, audits MCP servers, verifies AGENTS.md governance, and generates EU AI Act compliance reports.
    10
    63
    3
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Predeploy security scanner for AI-generated code. 80+ vulnerability patterns across secrets, auth, injection, config, Supabase, and logging. Runs locally, code never leaves your machine. Optional x402 witnessed attestation.
    136
    Apache 2.0
  • A
    license
    A
    quality
    C
    maintenance
    Security auditor for CI ecosystems that detects supply-chain and injection flaws in CI/CD configuration files across seven CI platforms, providing taint analysis, remediation, and compliance scoring.
    2
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Local-first security check for AI coding agents — finds hardcoded secrets, exposed .env files, git-history leaks and vulnerable dependencies (OSV), entirely on your machine. Ask your agent "is this safe to ship?" and get a Launch Readiness score with a fix for every finding.
    MIT

View all related MCP servers

Related MCP Connectors

  • Four IaC audits in one call: Compose, Dockerfile, GitHub Actions, Kubernetes. 131 checks.

  • Hadolint-grade Dockerfile audit — 19 checks: secrets, privileges, supply chain, hygiene.

  • Multi-CI security scanner with a live threat-intel feed of compromised CI components

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/evidiq/evidiq-bastion-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server