-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
102 lines (99 loc) · 3.96 KB
/
Copy pathaction.yml
File metadata and controls
102 lines (99 loc) · 3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: "Throne MCP Gate"
description: "Run your MCP server in a microVM, test it against Claude Code and Cursor, and gate the build on the verdict."
author: "Throne (usethrone.dev)"
branding:
icon: "shield"
color: "gray-dark"
inputs:
target:
description: >-
What to scan: an npm package (@scope/name or name), "uvx <pypi-name>",
or a github.com/owner/repo URL. Usually the package this repo publishes.
required: true
api-key:
description: "Your Throne API key. Store it in repo secrets and pass it here."
required: true
fail-on:
description: >-
Comma-separated verdicts that fail the build. Default "not_fit" (only
real protocol failures block). Add "inconclusive" to also block when the
server could not be assessed (for example it needs credentials).
required: false
default: "not_fit"
fail-on-security:
description: >-
Whether the security scan can also fail the build. "off" (default) keeps
security as review-only material that never blocks. "review" blocks on any
security finding. "high" blocks only when there is a high-severity finding.
required: false
default: "off"
comment-on-pr:
description: >-
Post a sticky comment with the verdict on the pull request. Requires the
workflow to grant `pull-requests: write`. Set to "false" to disable.
required: false
default: "true"
github-token:
description: "Token used to post the PR comment. Defaults to the workflow token."
required: false
default: ${{ github.token }}
api-base:
description: "Throne API base URL. Override only for self-hosted or testing."
required: false
default: "https://api.usethrone.dev"
timeout-seconds:
description: "Give up waiting for the scan after this many seconds."
required: false
default: "600"
sarif-file:
description: >-
Path to write a SARIF 2.1.0 report of the security findings. Leave empty
(default) to skip it. When set, upload the file with
github/codeql-action/upload-sarif to see findings in the Security tab and
inline on the pull request.
required: false
default: ""
outputs:
verdict:
description: "fit | not_fit | inconclusive | unknown"
value: ${{ steps.gate.outputs.verdict }}
reason:
description: "When inconclusive: needs_credentials | needs_arguments | needs_environment | unsupported_layout | install_timeout | no_handshake | launch_error"
value: ${{ steps.gate.outputs.reason }}
security-verdict:
description: "clean | review | not_run (review is material; blocks only when fail-on-security opts in)"
value: ${{ steps.gate.outputs.security-verdict }}
security-findings:
description: "Total number of security findings (0 when clean or not run)."
value: ${{ steps.gate.outputs.security-findings }}
security-high:
description: "Number of high-severity security findings."
value: ${{ steps.gate.outputs.security-high }}
scan-id:
description: "The scan id backing this verdict."
value: ${{ steps.gate.outputs.scan-id }}
record-url:
description: "Public evidence record for this verdict."
value: ${{ steps.gate.outputs.record-url }}
summary:
description: "One-line verdict summary from the run."
value: ${{ steps.gate.outputs.summary }}
sarif-file:
description: "Path to the written SARIF report, or empty when none was written."
value: ${{ steps.gate.outputs.sarif-file }}
runs:
using: "composite"
steps:
- id: gate
shell: bash
env:
THRONE_TARGET: ${{ inputs.target }}
THRONE_KEY: ${{ inputs.api-key }}
THRONE_API: ${{ inputs.api-base }}
THRONE_FAIL_ON: ${{ inputs.fail-on }}
THRONE_FAIL_ON_SECURITY: ${{ inputs.fail-on-security }}
THRONE_TIMEOUT: ${{ inputs.timeout-seconds }}
THRONE_COMMENT: ${{ inputs.comment-on-pr }}
THRONE_GH_TOKEN: ${{ inputs.github-token }}
THRONE_SARIF: ${{ inputs.sarif-file }}
run: bash "$GITHUB_ACTION_PATH/throne-gate.sh"