-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathmise.toml
More file actions
211 lines (176 loc) · 6.18 KB
/
Copy pathmise.toml
File metadata and controls
211 lines (176 loc) · 6.18 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# mise.toml - Tool versions and tasks for Agent Plugins for AWS
# See: https://mise.jdx.dev
min_version = "2026.2.4"
[env]
# Vendored Semgrep ruleset (RFC #211). Used by any bare `semgrep` call in a mise
# context because Semgrep reads SEMGREP_RULES whenever --config is absent. See
# tools/semgrep/ and `mise run semgrep:update`.
SEMGREP_RULES = "tools/semgrep/rules-vendored.yaml"
[tools]
uv = "0.10"
node = "24"
"npm:markdownlint-cli2" = "0.17"
"npm:ajv-cli" = "5"
"npm:dprint" = "0.51"
"pipx:pre-commit" = "4"
"pipx:bandit[sarif]" = "1"
"pipx:checkov" = "3"
"pipx:semgrep" = "1.151.0"
"grype" = "0.107.1"
"gitleaks" = "8.30.0"
# ==================
# ROOT LEVEL TASKS
# ==================
[tasks.pre-commit]
description = "Run pre-commit"
run = [
"pre-commit run --all-files"
]
# ======================
# LINTING & FORMATTING
# ======================
[tasks.fmt]
description = "Format all files"
run = "dprint fmt"
[tasks."fmt:check"]
description = "Check formatting (CI)"
run = "dprint check"
[tasks."lint:md"]
description = "Lint Markdown files (includes SKILL.md validation)"
run = "markdownlint-cli2 '**/*.md' '#node_modules' '#.git'"
[tasks."lint:md:fix"]
description = "Lint Markdown files (includes SKILL.md validation)"
run = "markdownlint-cli2 '**/*.md' '#node_modules' --fix"
[tasks."lint:manifests"]
description = "Validate JSON manifests"
run = [
"ajv validate -s schemas/marketplace.schema.json -d '.claude-plugin/marketplace.json' --all-errors --errors=text",
"ajv validate -s schemas/plugin.schema.json -d 'plugins/**/.claude-plugin/plugin.json' --all-errors --errors=text",
"ajv validate -s schemas/codex-marketplace.schema.json -d '.agents/plugins/marketplace.json' --all-errors --errors=text",
"ajv validate -s schemas/codex-plugin.schema.json -d 'plugins/**/.codex-plugin/plugin.json' --all-errors --errors=text",
"ajv validate -s schemas/mcp.schema.json -d 'plugins/**/.mcp.json' --all-errors --errors=text",
]
[tasks."lint:cross-refs"]
description = "Validate cross-references between manifests"
run = "node tools/validate-cross-refs.cjs"
[tasks.lint]
description = "Run all linters"
run = [
{ task = "lint:md" },
{ task = "lint:manifests" },
{ task = "lint:cross-refs"}
]
# =============
# VALIDATION
# =============
[tasks."validate:refs"]
description = "Detect broken links and orphaned reference files"
run = "uv run tools/validate-references.py"
[tasks."validate:size"]
description = "Check SKILL.md sizes and flag extraction candidates"
run = "uv run tools/validate-size.py"
[tasks."validate:urls"]
description = "Check HTTPS URLs in markdown files return 200 (network-dependent, not in build)"
run = "uv run tools/validate-urls.py"
[tasks.validate]
description = "Run all validation checks"
run = [
{ task = "validate:refs" },
{ task = "validate:size" }
]
# =============
# SCAFFOLDING
# =============
[tasks."init:skill"]
description = "Scaffold a new skill directory"
run = "uv run tools/init-skill.py"
# =========
# TESTING
# =========
[tasks."test:python"]
description = "Run Python unit tests with pytest (ephemeral, no repo dependency)"
# `uv run --with pytest` installs pytest into a cached, throwaway env for this
# run only — nothing is added to the repo's declared deps. pytest handles
# discovery/parametrize/fixtures natively. Exit code 5 = "no tests collected",
# which we treat as success so the build never breaks when tests are absent.
run = "uv run --with pytest pytest tools plugins || [ $? -eq 5 ]"
[tasks."test:node"]
description = "Run Node (JS/TS) unit tests when a package.json defines them"
run = "if [ -f package.json ] && grep -q '\"test\"' package.json; then npm test; else echo 'no package.json test script; skipping'; fi"
[tasks.test]
description = "Run unit tests across languages"
run = [
{ task = "test:python" },
{ task = "test:node" },
]
# =========
# SECURITY
# =========
[tasks."security:bandit"]
description = "Run Bandit"
run = [
"bandit -r . -x ./.tmp,./node_modules",
]
[tasks."security:semgrep"]
description = "Run SemGrepOSS"
# Uses the vendored ruleset (RFC #211): exclusions are baked into the vendored
# file, so no --exclude-rule flags. --config is explicit here for parity with
# CI/pre-commit; SEMGREP_RULES ([env]) covers bare `semgrep` calls too.
run = [
"semgrep scan --oss-only --verbose --metrics=off --config=tools/semgrep/rules-vendored.yaml --max-log-list-entries=0"
]
[tasks."semgrep:update"]
description = "Refresh the vendored Semgrep ruleset (RFC #211)"
# Re-downloads r/all and rebuilds rules-vendored.yaml (dropping rules marked
# excluded in rules-status.toml); reports new/orphaned rules. Run manually;
# then re-run security:semgrep.
run = "uv run tools/semgrep/rules-update.py"
[tasks."security:checkov"]
description = "Run Checkov"
run = [
"checkov --quiet --directory . "
]
[tasks."security:gitleaks"]
description = "Run GitLeaks"
# Scan only history reachable from HEAD (the current branch), not every ref in
# the clone. Without --log-opts, gitleaks walks all refs and fails on secrets
# that exist only on other, unmerged branches. Matches the CI scan scope.
run = [
"gitleaks git --config=.gitleaks.toml --baseline-path=.gitleaks-baseline.json --log-opts=HEAD",
]
[tasks."security:grype"]
description = "Run Grype"
run = [
"grype ."
]
[tasks."security:zizmor"]
description = "Run zizmor (GitHub Actions static analysis)"
# Runs via `uvx` so no repo dependency is added (same ephemeral pattern as
# tests). Scans .github/ (workflows + actions). ADVISORY for now: the repo has
# pre-existing findings (see #221), so `|| true` keeps this non-blocking until
# that backlog is burned down, after which the `|| true` is removed to gate.
run = [
"uvx zizmor@1.26.1 --offline .github/ || true",
]
[tasks.security]
description = "Run security scans"
run = [
{ task = "security:bandit" },
{ task = "security:semgrep" },
{ task = "security:gitleaks" },
{ task = "security:checkov" },
{ task = "security:grype" },
{ task = "security:zizmor" },
]
# ===============
# BUILD PROCESS
# ===============
[tasks.build]
description = "Complete build: lint, format, validate, test, security scans"
run = [
{ task = "lint" },
{ task = "fmt:check" },
{ task = "validate" },
{ task = "test" },
{ task = "security"}
]