@rafter-security/cli 0.11.7 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/agent/auto-update.js +171 -0
- package/dist/commands/agent/components.js +50 -176
- package/dist/commands/agent/enable.js +11 -1
- package/dist/commands/agent/index.js +2 -0
- package/dist/commands/agent/init.js +654 -764
- package/dist/commands/agent/install-files.js +689 -0
- package/dist/commands/agent/instruction-block.js +82 -40
- package/dist/commands/agent/scan.js +70 -21
- package/dist/commands/agent/status.js +11 -0
- package/dist/commands/agent/update.js +179 -0
- package/dist/commands/agent/verify.js +11 -0
- package/dist/commands/backend/get.js +5 -10
- package/dist/commands/backend/run.js +10 -20
- package/dist/commands/backend/scan-status.js +16 -3
- package/dist/commands/backend/usage.js +3 -6
- package/dist/commands/brief.js +6 -12
- package/dist/commands/counters.js +146 -0
- package/dist/commands/gates.js +36 -0
- package/dist/commands/hook/pretool.js +22 -9
- package/dist/commands/mcp/server.js +1 -1
- package/dist/commands/skill/registry.js +48 -0
- package/dist/core/usage-counters.js +439 -0
- package/dist/index.js +36 -0
- package/dist/scanners/gate-scanner.js +721 -0
- package/dist/scanners/regex-scanner.js +26 -25
- package/dist/utils/skill-manager.js +8 -338
- package/package.json +1 -1
- package/resources/continue-rules/rafter-code-review.md +6 -6
- package/resources/continue-rules/rafter-secure-design.md +3 -4
- package/resources/continue-rules/rafter-skill-review.md +4 -4
- package/resources/continue-rules/rafter.md +2 -2
- package/resources/cursor-rules/rafter-code-review.mdc +6 -6
- package/resources/cursor-rules/rafter-secure-design.mdc +3 -4
- package/resources/cursor-rules/rafter-skill-review.mdc +4 -4
- package/resources/cursor-rules/rafter.mdc +2 -2
- package/resources/rafter-security-skill.md +1 -1
- package/resources/shipped-hashes.json +332 -0
- package/resources/skills/rafter/SKILL.md +7 -7
- package/resources/skills/rafter/docs/cli-reference.md +37 -10
- package/resources/skills/rafter/docs/finding-triage.md +1 -1
- package/resources/skills/rafter/docs/guardrails.md +2 -2
- package/resources/skills/rafter/docs/shift-left.md +4 -4
- package/resources/skills/rafter-code-review/SKILL.md +43 -14
- package/resources/skills/rafter-code-review/docs/llm.md +2 -2
- package/resources/skills/rafter-code-review/docs/security-gates.md +53 -0
- package/resources/skills/rafter-secure-design/SKILL.md +1 -0
- package/resources/skills/rafter-skill-review/SKILL.md +1 -0
- package/resources/windsurf-rules/rafter-code-review.md +6 -6
- package/resources/windsurf-rules/rafter-secure-design.md +3 -4
- package/resources/windsurf-rules/rafter-skill-review.md +4 -4
- package/resources/windsurf-rules/rafter.md +2 -2
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"generatedBy": "scripts/gen-shipped-hashes.py",
|
|
4
|
+
"releases": [
|
|
5
|
+
"npm:0.1.0",
|
|
6
|
+
"npm:0.4.0",
|
|
7
|
+
"npm:0.4.1",
|
|
8
|
+
"npm:0.4.2",
|
|
9
|
+
"npm:0.5.1",
|
|
10
|
+
"npm:0.5.3",
|
|
11
|
+
"npm:0.5.5",
|
|
12
|
+
"npm:0.5.9",
|
|
13
|
+
"npm:0.6.1",
|
|
14
|
+
"npm:0.6.3",
|
|
15
|
+
"npm:0.6.4",
|
|
16
|
+
"npm:0.6.5",
|
|
17
|
+
"npm:0.6.6",
|
|
18
|
+
"npm:0.7.0",
|
|
19
|
+
"npm:0.7.1",
|
|
20
|
+
"npm:0.7.2",
|
|
21
|
+
"npm:0.7.3",
|
|
22
|
+
"npm:0.7.4",
|
|
23
|
+
"npm:0.7.6",
|
|
24
|
+
"npm:0.7.7",
|
|
25
|
+
"npm:0.7.9",
|
|
26
|
+
"npm:0.8.0",
|
|
27
|
+
"npm:0.8.1",
|
|
28
|
+
"npm:0.8.2",
|
|
29
|
+
"npm:0.8.3",
|
|
30
|
+
"npm:0.8.4",
|
|
31
|
+
"npm:0.8.5",
|
|
32
|
+
"npm:0.8.6",
|
|
33
|
+
"npm:0.8.7",
|
|
34
|
+
"npm:0.8.9",
|
|
35
|
+
"npm:0.8.10",
|
|
36
|
+
"npm:0.9.0",
|
|
37
|
+
"npm:0.9.1",
|
|
38
|
+
"npm:0.10.0",
|
|
39
|
+
"npm:0.10.1",
|
|
40
|
+
"npm:0.10.2",
|
|
41
|
+
"npm:0.10.3",
|
|
42
|
+
"npm:0.10.4",
|
|
43
|
+
"npm:0.10.5",
|
|
44
|
+
"npm:0.10.6",
|
|
45
|
+
"npm:0.11.1",
|
|
46
|
+
"npm:0.11.2",
|
|
47
|
+
"npm:0.11.3",
|
|
48
|
+
"npm:0.11.4",
|
|
49
|
+
"npm:0.11.5",
|
|
50
|
+
"npm:0.11.6",
|
|
51
|
+
"npm:0.11.7",
|
|
52
|
+
"pypi:0.1.0",
|
|
53
|
+
"pypi:0.4.0",
|
|
54
|
+
"pypi:0.4.1",
|
|
55
|
+
"pypi:0.4.2",
|
|
56
|
+
"pypi:0.5.1",
|
|
57
|
+
"pypi:0.5.3",
|
|
58
|
+
"pypi:0.5.5",
|
|
59
|
+
"pypi:0.5.9",
|
|
60
|
+
"pypi:0.6.1",
|
|
61
|
+
"pypi:0.6.3",
|
|
62
|
+
"pypi:0.6.4",
|
|
63
|
+
"pypi:0.6.5",
|
|
64
|
+
"pypi:0.6.6",
|
|
65
|
+
"pypi:0.7.0",
|
|
66
|
+
"pypi:0.7.1",
|
|
67
|
+
"pypi:0.7.2",
|
|
68
|
+
"pypi:0.7.3",
|
|
69
|
+
"pypi:0.7.4",
|
|
70
|
+
"pypi:0.7.6",
|
|
71
|
+
"pypi:0.7.7",
|
|
72
|
+
"pypi:0.7.9",
|
|
73
|
+
"pypi:0.8.0",
|
|
74
|
+
"pypi:0.8.1",
|
|
75
|
+
"pypi:0.8.2",
|
|
76
|
+
"pypi:0.8.3",
|
|
77
|
+
"pypi:0.8.4",
|
|
78
|
+
"pypi:0.8.5",
|
|
79
|
+
"pypi:0.8.6",
|
|
80
|
+
"pypi:0.8.7",
|
|
81
|
+
"pypi:0.8.9",
|
|
82
|
+
"pypi:0.8.10",
|
|
83
|
+
"pypi:0.9.0",
|
|
84
|
+
"pypi:0.9.1",
|
|
85
|
+
"pypi:0.10.0",
|
|
86
|
+
"pypi:0.10.1",
|
|
87
|
+
"pypi:0.10.2",
|
|
88
|
+
"pypi:0.10.3",
|
|
89
|
+
"pypi:0.10.4",
|
|
90
|
+
"pypi:0.10.5",
|
|
91
|
+
"pypi:0.10.6",
|
|
92
|
+
"pypi:0.11.1",
|
|
93
|
+
"pypi:0.11.2",
|
|
94
|
+
"pypi:0.11.3",
|
|
95
|
+
"pypi:0.11.4",
|
|
96
|
+
"pypi:0.11.5",
|
|
97
|
+
"pypi:0.11.6",
|
|
98
|
+
"pypi:0.11.7"
|
|
99
|
+
],
|
|
100
|
+
"files": {
|
|
101
|
+
"agents/rafter.md": [
|
|
102
|
+
"7f26f0fcfe15be9c4dbddc469274f0847c84e1f02e56fd9a740eaf577b087138",
|
|
103
|
+
"cd43492743631103c4f32af79ef40082893d6290509c6161f66e6a5c4c228d61"
|
|
104
|
+
],
|
|
105
|
+
"agents/rafter.md#cursor": [
|
|
106
|
+
"8b02e1c6118b35b87455f649ed0b70c366100205b5572f71862a86dbc031dc5b",
|
|
107
|
+
"925c3223805bbc8671692c06a1557e14a818688a0e8e20e9c0234685abe0b6ef",
|
|
108
|
+
"cca6c6419c2d868d6e933b434b28e411efa6a56964c169412f66a06b437c0ba3",
|
|
109
|
+
"d45af23f64c961c904c841f34ecc5fc265cadd23e2131689617db28e793b937e"
|
|
110
|
+
],
|
|
111
|
+
"continue-rules/rafter-code-review.md": [
|
|
112
|
+
"5656add4780c521ec9c146fd017488241113b98483f8109e120107fa977fe900"
|
|
113
|
+
],
|
|
114
|
+
"continue-rules/rafter-secure-design.md": [
|
|
115
|
+
"4a1b353a92f39249c8f3ec1580fea1b6647bef20fce404d19a1374c6ea467446"
|
|
116
|
+
],
|
|
117
|
+
"continue-rules/rafter-skill-review.md": [
|
|
118
|
+
"185bf3f3972d2d4ccf9d9073e35d986ece32c74a4a1626a9f0df63a597639e1e"
|
|
119
|
+
],
|
|
120
|
+
"continue-rules/rafter.md": [
|
|
121
|
+
"3edf3d0d719f715c4e7591ca92691bc8bf7cd3650201feb2acf1eeef21432520",
|
|
122
|
+
"e276f0c2305d0559ffa207583e3415f03de57bfd46062cef204e76628ae5d7bd"
|
|
123
|
+
],
|
|
124
|
+
"cursor-rules/rafter-code-review.mdc": [
|
|
125
|
+
"c9bb381c63cfbaef60229a7960545256483da44736df1764a0404f5979ca1a8a"
|
|
126
|
+
],
|
|
127
|
+
"cursor-rules/rafter-secure-design.mdc": [
|
|
128
|
+
"1b705d54ace97336780c5266c5215106e940305e1e7ea180611b1f2cd89f5334"
|
|
129
|
+
],
|
|
130
|
+
"cursor-rules/rafter-skill-review.mdc": [
|
|
131
|
+
"2afd40eebdff79ce03a5e27ba2ff3cedab48d48577ddb7e91539cdc9da823d8f"
|
|
132
|
+
],
|
|
133
|
+
"cursor-rules/rafter.mdc": [
|
|
134
|
+
"3ef43ff4eb68e6badc1afff14affea622e765e8a5c54dc472b3977e946099e52",
|
|
135
|
+
"6e930e0a314f87838f1d27dc028a43d2ca63bdcbf68c1c536ee2a3d57d744921"
|
|
136
|
+
],
|
|
137
|
+
"pre-commit-hook.sh": [
|
|
138
|
+
"1a9d9525cc9a852d3feb8444f204ca4be74d0b5c8744443d0b82b2b9b6ae97a6",
|
|
139
|
+
"465a95c50f05e8b9cae039d256782652e24f68932b369e15c32046c6f629c8f6",
|
|
140
|
+
"748efecd2ef707dc3ffa31b35983de857c2bdd47437c0f9b9a2a86b1dde94735",
|
|
141
|
+
"cf113b56560a39d36b0cf32632c293049168e43da12c22bf20b7f89f54c03958"
|
|
142
|
+
],
|
|
143
|
+
"pre-push-hook.sh": [
|
|
144
|
+
"00ece55843a54c1a90fe6fc1a3adc3a3121df1e3fc3ef857b49a593196fdeb46",
|
|
145
|
+
"9357e8f1791540fdc35263dfe89a72ab6628e8d3ab16622db052dfc6d6e6262d",
|
|
146
|
+
"dbf6c7454afdb22ce6d51cd3bdf83f5906df7c6d24e74ce4af17b9d8f8ac36d5"
|
|
147
|
+
],
|
|
148
|
+
"rafter-security-skill.md": [
|
|
149
|
+
"0d0944b55c7e2c039cf50d11ebfa0d541d579ea657af10a0f1e6e1cdcff627d6",
|
|
150
|
+
"0ded6febc7286708bbb5165f1a74945e4f8be8d4f329f0b424776e1a8ccbcaf9",
|
|
151
|
+
"0f9dd01d940fa70baedf32295897f9c3ae595727ed0d222dc67095ecd51f79ff",
|
|
152
|
+
"10759e608d7cce905a7d6af68648f9ce1613ba418ab8129f1d85619a5a30fe6d",
|
|
153
|
+
"1be4272a39bf04331fea4c684270c72b4feb298a110cef719883618021f7c763",
|
|
154
|
+
"227e7a6bb96a73ed5d04ec253ab74b344ed34e5196b5933946a73918919b0ac0",
|
|
155
|
+
"3f2c9634a0ae5a10bec6e203a2482ebf32d4c59d088fd0465736b31fa259ebdb",
|
|
156
|
+
"42dd4abf028cbdc2d4286d6789a779cdf70f0ce81a312f09fd447a7af22d95b9",
|
|
157
|
+
"4af96c10f12ebff90ce09026fa44d2120cc3d289e9a457b8228c8cbfaf2ec485",
|
|
158
|
+
"4e422525e338b846d1fd15fbcbdc07bd29a21eb47afe7f36ac71da77bb617a42",
|
|
159
|
+
"539e05701b0fdff27df3f581da437d09d6d43f32fc4c9324391bcb6b4d4cc54a",
|
|
160
|
+
"608e87ee58250eeba96929b63f1eb93d2fa9a06973b077c5f5cf52c57bb3f1b9",
|
|
161
|
+
"63da401d5f2a3b8d7046eb3145a1ebe360715a36ad7bd19d04553bd906f90822",
|
|
162
|
+
"658d9e454e6b718aa47144f56f8a8cbf1cab5b6446854b9ec39920f6d29538e8",
|
|
163
|
+
"6938d6c1e9ea2488edc98fe81dc3db97ac29d05b56544693635536d1e889b07c",
|
|
164
|
+
"6f871dbb2862700242f5d1faaedce31766d1abffca0f08dc3a5ace56f1ed55d9",
|
|
165
|
+
"73c40867f8b780152ebff01b6ebc47224c9494aad7d9532b4f8289e03d7af8ef",
|
|
166
|
+
"7a4ef63ed4f24e7dd9810e286d96a7d334d46d1365078681934c211a8cda784a",
|
|
167
|
+
"865bcdde475439b50457b5b8388dfe132a7c7807e6786995c9500c92c7cf9db6",
|
|
168
|
+
"886d65416bb19057bb4fbef4cad2b8fa392197e53a5fb1f3e9ce3b30c7ca2f65",
|
|
169
|
+
"989713d60ab02ab04d03c80d448510b245d986a292f437fa355ab6845b75f942",
|
|
170
|
+
"9b7b27ae5248e55dbfa9d6c7d5cb6a4e3dec31b16268ea89a4264e9feae7ae1b",
|
|
171
|
+
"9bfa29fe4ca55ff0775d83d567063fa1a02b934fba393f2b6fd336481e313b89",
|
|
172
|
+
"9c028cd429f974c1542edb251d952aed20ccc97e5e8f6740b6e8a9e46f3a11ba",
|
|
173
|
+
"a3616bb898b7fa9fdf7af71e503975ab846c11dd2ff4176824f6e4de278cbf6b",
|
|
174
|
+
"a5cba1a60c237f7dbb6b4c4d1c876150c12230901d5c3eb12c1b43e6764bac94",
|
|
175
|
+
"b354d85ba5197f0a8636a5e697a35e4447d1f0bc8e82a063e5ccc37ff01f4b9f",
|
|
176
|
+
"b797daec80ee6a61f027eaedd1af4847fb1ca32650877ae418eed0d7490fae6b",
|
|
177
|
+
"c3e27836a916c4ae52ec1d5da3ec9adda7eb7541a95f7df8f2eed797d9e7ecf1",
|
|
178
|
+
"d6e30d8cbbe5006856000823e6a6fb201d6b19181c468cdfbe9ae9d9b27a497d",
|
|
179
|
+
"e3238386186c1cef12a784ca7bafc4145ce75784505f872225045172c2cae361",
|
|
180
|
+
"ea28251e967cdaca3b2eceb6d095ab493c351c00b8b653fb8fa3e022eddeab8d",
|
|
181
|
+
"eaa0054d8ce4b9f14318f0af45fba7c77f5a66e276c0e40083e9bb5d402855d8",
|
|
182
|
+
"f0f91263031fbe3743d9fb15e2654d6e7d1da315c457f6eb89d8a42796da9069",
|
|
183
|
+
"f90a98590192e203287d4d1f7ea1b7f565fc38ec4e6bf6303bbed6889cafbb38",
|
|
184
|
+
"fc78cbcd79dd8b14f39bd1e43009d42a763268d13863198209b156479a3bf26c",
|
|
185
|
+
"fe3c9a1ae64574590ce3cb75c6c974629ea54169e71b9bc496916a223544d5de"
|
|
186
|
+
],
|
|
187
|
+
"skills/rafter-agent-security/SKILL.md": [
|
|
188
|
+
"2c6ca20da23881b7b4e4684e3b15b6db0801f713054515fda7a3ada91080315d",
|
|
189
|
+
"39713364b127f41bde74adc808ca5e11a0d6dbc6d1bf500aa1644e43cd4d1a64",
|
|
190
|
+
"5b15b27519c906f152c929588fcde57d75a772e11f795c952714776953b2ed02",
|
|
191
|
+
"6c300367ee9f80e15d99c43089c6e41178f58f644acdb1f670ba403664ca958b",
|
|
192
|
+
"9cadd0e37a40eb769b80d09546c3b22a0fb98369da4adad38047d3e531edb0fb",
|
|
193
|
+
"c911a92550e9569fc41578dd7c97634f72de348cd3febc8375e8ce8669b42bea",
|
|
194
|
+
"ce8230461fb07ae71a733e266551336b927e8b1948b689509997e0e47d86f1ce",
|
|
195
|
+
"f39bcfe8a1d4dc9f2ef4ade7bd569dbf6e55e63a45825d5d18467f7323624a43"
|
|
196
|
+
],
|
|
197
|
+
"skills/rafter-code-review/SKILL.md": [
|
|
198
|
+
"2b50118c0c26da8c59b27f85f6d620225e95a179d0b10ee3dd896e3937f15431",
|
|
199
|
+
"424b1a61b88a2d78346cabe327c7209a71db14de2f32ef8283bce3883f2c65a0",
|
|
200
|
+
"bb8693ae13f6ea685ef42bd643a792cd684b120a2dae04849bdb0aed285cef94",
|
|
201
|
+
"fe630c5a2ffcd417991e3042b41f50d041cee66bde8afdc66aa43c483fb95846"
|
|
202
|
+
],
|
|
203
|
+
"skills/rafter-code-review/docs/api.md": [
|
|
204
|
+
"fde9c5588ea1bca2fc0134270d1d3d5622f8f1426b46ca6b37ff5942aa2011a7"
|
|
205
|
+
],
|
|
206
|
+
"skills/rafter-code-review/docs/asvs.md": [
|
|
207
|
+
"eb782dbdff04ef64551bb73b45c5af7ff151809cd1aff05cd63d2e04aa2fa977"
|
|
208
|
+
],
|
|
209
|
+
"skills/rafter-code-review/docs/cwe-top25.md": [
|
|
210
|
+
"9efcc026603bc0f01863746edbc785edd7c821eb9c8d9f5cf235eb3c86e17054",
|
|
211
|
+
"d29ad50b92b25134d4a61d9411a6a3b2db033c05ce549c6474f63410b0b847e4"
|
|
212
|
+
],
|
|
213
|
+
"skills/rafter-code-review/docs/investigation-playbook.md": [
|
|
214
|
+
"4021cd8a51bd96934d1008c17ccae7e2b808256a0d92aee1f08158d350efd687"
|
|
215
|
+
],
|
|
216
|
+
"skills/rafter-code-review/docs/llm.md": [
|
|
217
|
+
"2d84ab89643c44e39a75b829ee54aef5b750cd138c24999fa1aef9af458f6b27"
|
|
218
|
+
],
|
|
219
|
+
"skills/rafter-code-review/docs/web-app.md": [
|
|
220
|
+
"453a2ea88dc29a247f4364321fd2b833cbdd9c8a702df6f03c1318e7face9a3d",
|
|
221
|
+
"de8aea7c12a36ae4f6854189e28d783f121689bfe5d2f49580b22bd6409f5740"
|
|
222
|
+
],
|
|
223
|
+
"skills/rafter-secure-design/SKILL.md": [
|
|
224
|
+
"162ee5c333cf480c08598bbffe5e51c057c9bcdd4dda3a618c115dd3f8a5d672",
|
|
225
|
+
"883b997145a10caf1a03c70a5e1d06ab9c018b5924ff574c5020cbc8b74ab970",
|
|
226
|
+
"bf2441c99029254d8162bb67ad041920bbcb5c9c8fb4cfcf62e7ad333a7cd4ae",
|
|
227
|
+
"f039d753451aa019c1f3ba9aa7f9cc6abeedbcb528421d9fd47aa62a0a878c6d"
|
|
228
|
+
],
|
|
229
|
+
"skills/rafter-secure-design/docs/api-design.md": [
|
|
230
|
+
"33dada1dfc437dab06d46374f6d47c305c63f38579607ea418d2b06320ba4326"
|
|
231
|
+
],
|
|
232
|
+
"skills/rafter-secure-design/docs/auth.md": [
|
|
233
|
+
"58e2aafa984d84c05118973b2f8a5bc3d06b1f3bb8c50c1b8eb42a9821c55ec2"
|
|
234
|
+
],
|
|
235
|
+
"skills/rafter-secure-design/docs/data-storage.md": [
|
|
236
|
+
"fcb9b0f3d3d804e9568d46ed554d75e552dc0948607146481d116efbaf8c0cdd"
|
|
237
|
+
],
|
|
238
|
+
"skills/rafter-secure-design/docs/dependencies.md": [
|
|
239
|
+
"29ac183ca8866d5094d206db7151e38b6e61e8f1248116189a398840a977f283"
|
|
240
|
+
],
|
|
241
|
+
"skills/rafter-secure-design/docs/deployment.md": [
|
|
242
|
+
"bcb9fcd356be0f4f105b7b6b89557e9ec43de83938985b6a55539655688a702b"
|
|
243
|
+
],
|
|
244
|
+
"skills/rafter-secure-design/docs/ingestion.md": [
|
|
245
|
+
"d83fa2aba2d24c6c247bd83a0e2351c73420d513ef53be64aefa5f6dbbe7af7c"
|
|
246
|
+
],
|
|
247
|
+
"skills/rafter-secure-design/docs/standards-pointers.md": [
|
|
248
|
+
"b261ecfc357b46162aa3037085b3debf4880d9a5aae0cd17149bc9145a6e6779"
|
|
249
|
+
],
|
|
250
|
+
"skills/rafter-secure-design/docs/threat-modeling.md": [
|
|
251
|
+
"6453ef6128e1ead68ae1cc9bc1182216bcf92bf4a1e3b543db7ef20997eed389"
|
|
252
|
+
],
|
|
253
|
+
"skills/rafter-skill-review/SKILL.md": [
|
|
254
|
+
"0c8a0ed7649662177b88f9576e06a85fb595f48f5187a1c12f4d38aa4ad05fc8",
|
|
255
|
+
"5f68a8e224fe9e9693a2a5ebeda30a543cd5625e92fc3a507a10c90077d2131a",
|
|
256
|
+
"700879944e86e264c9f9f943b8b97e4968ba03d015d64cd7ce2780587eb3c0c2"
|
|
257
|
+
],
|
|
258
|
+
"skills/rafter-skill-review/docs/authorship-provenance.md": [
|
|
259
|
+
"2b94a715dc69d8e0c7c439d8d1563fb7c93192b7540f161a0b73c2aa5ff0fd0d"
|
|
260
|
+
],
|
|
261
|
+
"skills/rafter-skill-review/docs/changelog-review.md": [
|
|
262
|
+
"63bced06258ab69f008eec5eb37c15a89335e280e68b97c7ae75ddbb0673a4fe"
|
|
263
|
+
],
|
|
264
|
+
"skills/rafter-skill-review/docs/data-practices.md": [
|
|
265
|
+
"ff9ae66147415af1de0193be5f33c17e40ab511041e3e8b49fa22789e27bec3f"
|
|
266
|
+
],
|
|
267
|
+
"skills/rafter-skill-review/docs/malware-indicators.md": [
|
|
268
|
+
"17b6155874ddab2e551166dace6650261b759a27944e82088a1d006d1e2b74d9"
|
|
269
|
+
],
|
|
270
|
+
"skills/rafter-skill-review/docs/prompt-injection.md": [
|
|
271
|
+
"cca797f7683d6ce19b9e58ee895bf33c468c057395593e949e1cf44e965d7219"
|
|
272
|
+
],
|
|
273
|
+
"skills/rafter-skill-review/docs/telemetry.md": [
|
|
274
|
+
"ada78de2d445ce2aa233364eaf3d45e780068dc1103c12b28d79c20edd8c19e8"
|
|
275
|
+
],
|
|
276
|
+
"skills/rafter/SKILL.md": [
|
|
277
|
+
"0d4996783e58e761e371042a322fe2a567678ce41d0c1f680b80c385b73633b6",
|
|
278
|
+
"195cf4caeaca3caa7485027740c5a4637413b402d7524b64d3389b813feb3b80",
|
|
279
|
+
"26312d32cd8f3249809ad20ac351978595331f3f555e7362bf2e442d18e00831",
|
|
280
|
+
"2833c4e5219f5931a29c5c0d4c0e147222bf537513bb937eb78339988aff1806",
|
|
281
|
+
"3c0d068b46e0152a664afa77029e06c07d6afd7454fca8ad49dbb4115abbe3e5",
|
|
282
|
+
"3e9098c410472966255f1bc92392ceefd95fe2692abcb47cdb825ae29cfa609b",
|
|
283
|
+
"5cf20a4488917d7450ac65f2cdcb51a39b776c1d3cc228d02b61e49c347a2a9d",
|
|
284
|
+
"89ba6dede2becdeb827eb341cf1bc7bccdc14e77c40602d8f9f4a422c2f957ee",
|
|
285
|
+
"8d9121fd00e1df944f91552e1bb050f02c802617c5196886c5fad1e407d0b62f",
|
|
286
|
+
"947d3fddefc8fc5add52580624a9943d1997dab0406a910889f71b75143cfdc8",
|
|
287
|
+
"9ce84eeb42faeec5cc617970538d6c767d53d87395d1e440b7d41da64f0de9df",
|
|
288
|
+
"aa994751d5bb1144f12ac6b5579531158d2aad42e94340095214458f08df464a",
|
|
289
|
+
"be560dd666a8412fe2b418b13ce229555ce96ffc168cf2ed1e9e1a673982b96c",
|
|
290
|
+
"bfe6e32a76633d7bb27887bac09ca5c6124a059d7a2447c7ec2ae3df1af51582",
|
|
291
|
+
"c4c1257117d044b331b2cffa426414da9ac181f63874d72ee2dea70bd5a59cc2"
|
|
292
|
+
],
|
|
293
|
+
"skills/rafter/docs/backend.md": [
|
|
294
|
+
"0fc7a064349fd21dbfbb16823df4f354d5c815bd2615b4f0068af2e9efa22361",
|
|
295
|
+
"f4d09e4edaee2485007a34f91350c5f578f42a552856661daf59aac129840799"
|
|
296
|
+
],
|
|
297
|
+
"skills/rafter/docs/cli-reference.md": [
|
|
298
|
+
"9a4d16fced373b74f94003efcb3ca07845000611b9e3ed02c254ed3c56ee709b",
|
|
299
|
+
"ad83d9d124f4b16072b6de86740f85a44f36b24f71732a6b9ddf1f422bfa7af3",
|
|
300
|
+
"cad7e9c376a81ba9dc9c3dec922d803c4fda7e8dc6c16c30d256fe0ebc16926a",
|
|
301
|
+
"e136680572d51fdd8991480f1107e593b8e10e56f4a50a65dad90494883a3405"
|
|
302
|
+
],
|
|
303
|
+
"skills/rafter/docs/finding-triage.md": [
|
|
304
|
+
"3a695a3307a5b24caa3596418747dca6978dac09e19fbb58e08f6fd739d3c978",
|
|
305
|
+
"4b322015dac08700d10b91612038e5d507f9eee909f93ffb05be16159c9ad897",
|
|
306
|
+
"acec199c83a1512a977d125ed3129985d9877dd253efda8a201701335f5ddc0b"
|
|
307
|
+
],
|
|
308
|
+
"skills/rafter/docs/guardrails.md": [
|
|
309
|
+
"3234fe5df25c1fe5028d7151deeddfad8a14c22bfca2a93a903fe66a9d6c1bd3",
|
|
310
|
+
"cb63482cdb518d8d66a383e156234fb4129a6177801f5901476d6b48636d33a5",
|
|
311
|
+
"d6c272f415cfd9f0ab59ca60af59148ca03c9ea71da5f182531af24297a02cdb",
|
|
312
|
+
"ee6f8dbcb27d7167b14c028839491846fe254235c689f6eff42311c7d02ba193"
|
|
313
|
+
],
|
|
314
|
+
"skills/rafter/docs/shift-left.md": [
|
|
315
|
+
"ebeafb938114bf655d05f8608ae7a4b0fe623f2c7a8d7f41d136d8937fa0ee6e",
|
|
316
|
+
"fe735d0fb3ee7f4534ec4d9e7c75a7794dc01624171b74b44695bff943377961"
|
|
317
|
+
],
|
|
318
|
+
"windsurf-rules/rafter-code-review.md": [
|
|
319
|
+
"1c7dcf4984c216a32b56efbdb4539f61f8e14774f71726e1ce1b4d0143cbef22"
|
|
320
|
+
],
|
|
321
|
+
"windsurf-rules/rafter-secure-design.md": [
|
|
322
|
+
"44a3cffecb973f9d898009e472d88ad5c6c6c637deb5cdf8d9512f9a011c1b9e"
|
|
323
|
+
],
|
|
324
|
+
"windsurf-rules/rafter-skill-review.md": [
|
|
325
|
+
"0e22f2217b1cb4369a1463242a1e8a2840c1c2bf42aa3206967eaef13fbf7b30"
|
|
326
|
+
],
|
|
327
|
+
"windsurf-rules/rafter.md": [
|
|
328
|
+
"2f07fae62e3dcaa3a8d33677fa6f13ef0b46ab3bbe69e722416b8c995614e1bd",
|
|
329
|
+
"77ab89028fe69824818719b76cee4e090f207fa88ca61a62878ad09f25513126"
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: rafter
|
|
3
3
|
description: "Entry point for rafter. Invoke when a sub-skill is unclear, or when the task needs `rafter run` (remote SAST+SCA), `rafter secrets` (local secrets-only), `rafter agent audit`, policy checks, or command-risk evaluation. Scope by security surface, not task label: engage when the diff touches auth, credentials/secrets/tokens, untrusted input, SQL, shell/exec, file paths, deserialization, crypto, network endpoints, data deletion, or dependencies; for research/experimental/local-only code with none of that, a quick surface check is enough. When such surface IS present and no rafter skill or CLI call has been made, invoke this before handing the task off — an un-evaluated \"done\" on genuine security surface is not done."
|
|
4
4
|
version: 0.7.0
|
|
5
|
+
publisher: rafter-security
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
# Rafter — Security Toolkit for AI Workflows
|
|
@@ -18,15 +19,15 @@ Rafter is a **surface-driven** gate, not a task-label gate. Read the diff's actu
|
|
|
18
19
|
|
|
19
20
|
---
|
|
20
21
|
|
|
21
|
-
## Picking the right tier
|
|
22
|
+
## Picking the right tier
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
The review you do yourself with `rafter-code-review` is the step that finds logic and authorization bugs; no scanner tier replaces it. The scanner tiers are **not interchangeable**:
|
|
24
25
|
|
|
25
26
|
1. **`rafter secrets`** — hardcoded credentials only (regex + betterleaks). Fast, offline, no key. **NOT a code security scan** — it finds no SQL injection, SSRF, auth bugs, insecure deserialization, logic flaws, or dependency vulns. A clean `rafter secrets .` is secret-hygiene, not security review.
|
|
26
27
|
2. **`rafter run`** (default mode) — the real code-analysis pass: SAST + SCA + secrets (dataflow, taint, known-vulnerable deps, crypto misuse, injection sinks). Needs `RAFTER_API_KEY`.
|
|
27
28
|
3. **`rafter run --mode plus`** — agentic deep-dive: LLM-guided investigation of what the rules engine flags. Slower, higher signal; code is deleted server-side after the run. **PAID tier — consumes the user's credits; ask before running it.** If `scan.plus_requires_approval` is set, Plus refuses without `--yes` / `RAFTER_CONFIRM=1`.
|
|
28
29
|
|
|
29
|
-
**
|
|
30
|
+
**For a security-relevant task:** review it with `rafter-code-review`, run `rafter secrets` on the changed files, and add `rafter run` when `RAFTER_API_KEY` is set and the branch is pushed (it scans the pushed commit, not your working tree). Without a key, say that no SAST/SCA ran; don't claim the code was "scanned" without qualification. Deterministic findings, stable exit codes and JSON shapes — safe to chain in CI and in agent loops.
|
|
30
31
|
|
|
31
32
|
---
|
|
32
33
|
|
|
@@ -38,7 +39,7 @@ Pick the branch that matches what you're trying to do. Each branch points at a s
|
|
|
38
39
|
|
|
39
40
|
Use this for: "Is this safe to push?", "Check for leaks", "Run a security scan", pre-merge / pre-deploy gating, post-dependency-update checks.
|
|
40
41
|
|
|
41
|
-
-
|
|
42
|
+
- **`rafter run`** — remote SAST + SCA + secrets on the pushed commit. Needs `RAFTER_API_KEY`.
|
|
42
43
|
- **Deep-dive: `rafter run --mode plus`** — agentic analysis when stakes are high or fast mode flagged something suspicious worth investigating.
|
|
43
44
|
- **Secrets-only fallback: `rafter secrets`** — use when no API key is available, or alongside `rafter run` for fastest secret-leak feedback. Does NOT analyse code — only hunts hardcoded credentials.
|
|
44
45
|
- **Read `docs/backend.md`** for fast-vs-plus modes, auth, latency, cost.
|
|
@@ -57,9 +58,8 @@ Use this for: "Is `rm -rf $DIR` safe?", any destructive-looking shell the user t
|
|
|
57
58
|
Use this for: installing an MCP server, adding a Claude skill, vetting an AI tool config.
|
|
58
59
|
|
|
59
60
|
- **Installing a new skill? → Read `rafter-skill-review/SKILL.md`** — full provenance, malware, prompt-injection, data-practices, telemetry checklist.
|
|
60
|
-
- Run the deterministic pass: `rafter skill review <path-or-url>` (emits JSON).
|
|
61
|
-
-
|
|
62
|
-
- **Read `docs/cli-reference.md`** §`skill review` / §`agent audit` for output shape and exit codes.
|
|
61
|
+
- Run the deterministic pass: `rafter skill review <path-or-url>` (emits JSON). `--installed` reviews every skill already on this machine instead of a path.
|
|
62
|
+
- **Read `docs/cli-reference.md`** §`skill review` for output shape and exit codes.
|
|
63
63
|
|
|
64
64
|
### (d) I want to understand a finding I already have
|
|
65
65
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Full command tree for the `rafter` CLI. Commands group by concern: **scanning**, **agent** (local security primitives), **hook** (platform bridges), **policy**, **ci**, **mcp**, **docs/brief**, **notify**, **report**.
|
|
4
4
|
|
|
5
5
|
Global flags:
|
|
6
|
-
- `-a, --agent` — plain output (no colors/emoji) for AI consumers.
|
|
6
|
+
- `-a, --agent` — plain output (no colors/emoji) for AI consumers. Works before or after the subcommand name.
|
|
7
7
|
- `--version`, `version` — print version.
|
|
8
8
|
|
|
9
9
|
Exit codes (consistent across commands):
|
|
@@ -30,15 +30,16 @@ Key options: `--repo org/repo`, `--branch <name>`, `--mode fast|plus`, `--format
|
|
|
30
30
|
|
|
31
31
|
Example: `rafter run --repo myorg/api --branch feature/auth --mode plus --format json`
|
|
32
32
|
|
|
33
|
-
### `rafter secrets [path]`
|
|
33
|
+
### `rafter secrets [path...]`
|
|
34
34
|
|
|
35
|
-
Local secret scan. Deterministic, offline, no API key. Dual-engine: Betterleaks binary if present, built-in regex fallback (21+ patterns).
|
|
35
|
+
Local secret scan. Deterministic, offline, no API key. Dual-engine: Betterleaks binary if present, built-in regex fallback (21+ patterns). Accepts one or more paths; findings merge into a single report.
|
|
36
36
|
|
|
37
37
|
When: pre-commit, pre-push, fast first pass before remote scan, air-gapped envs.
|
|
38
38
|
|
|
39
|
-
Useful flags: `--history` (scan git history with Betterleaks), `--format json`, `--quiet`.
|
|
39
|
+
Useful flags: `--history` (scan git history with Betterleaks), `--format json`, `--out <file>` (write JSON/SARIF to a file instead of stdout — for a sandbox with no shell redirects), `--quiet`.
|
|
40
40
|
|
|
41
41
|
Example: `rafter secrets . --format json`
|
|
42
|
+
Example (several paths, writing to a file): `rafter secrets src/ infra/ --json --out findings.json`
|
|
42
43
|
|
|
43
44
|
(Back-compat aliases: `rafter scan local` and `rafter agent scan`. Prefer `rafter secrets`.)
|
|
44
45
|
|
|
@@ -68,15 +69,15 @@ When: any time a destructive-looking command is about to be executed by an agent
|
|
|
68
69
|
|
|
69
70
|
Example: `rafter agent exec --dry-run -- rm -rf $WORK_DIR`
|
|
70
71
|
|
|
71
|
-
### `rafter agent audit [
|
|
72
|
+
### `rafter agent audit [opts]`
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
View audit log entries — the local JSONL trail of hook decisions and security-relevant events (not a code or directory scan). Filter with `--last <n>`, `--event <type>`, `--agent <type>`, `--since <date>`, `--repo <pattern>`, `--cwd <pattern>`. Use `--verify` to check the hash chain for tampering, `--share` to generate a redacted excerpt for issue reports.
|
|
74
75
|
|
|
75
|
-
When:
|
|
76
|
+
When: postmortems ("why did this command run?"), confirming the audit trail is intact.
|
|
76
77
|
|
|
77
|
-
### `rafter agent audit-skill <path>`
|
|
78
|
+
### `rafter agent audit-skill <path>` (deprecated)
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
Deprecated alias for `rafter skill review <path>` — emits a stderr warning and forwards to it. Use `rafter skill review` directly; see Skill Management below.
|
|
80
81
|
|
|
81
82
|
### `rafter agent status` · `rafter agent verify`
|
|
82
83
|
|
|
@@ -107,12 +108,38 @@ Snapshot current findings so only *new* ones fail future scans.
|
|
|
107
108
|
|
|
108
109
|
Emit a ready-to-paste instruction block for an agent's system prompt.
|
|
109
110
|
|
|
111
|
+
### `rafter agent update`
|
|
112
|
+
|
|
113
|
+
Bring every installed rafter skill, rule, instruction block, hook and MCP entry up to this CLI's version. The pretool hook already refreshes unmodified skill and rule files once a day after an upgrade.
|
|
114
|
+
A file you or the user edited is kept, and the new version is written beside it as `<file>.rafter-new`; `rafter agent status` lists each one.
|
|
115
|
+
To reconcile: merge the local changes into `<file>.rafter-new`, move it over `<file>`, then run `rafter agent update` (or delete `<file>.rafter-new` to keep the local version as is).
|
|
116
|
+
|
|
110
117
|
### `rafter agent update-betterleaks`
|
|
111
118
|
|
|
112
119
|
Download / upgrade the Betterleaks binary Rafter uses for local scans.
|
|
113
120
|
|
|
114
121
|
---
|
|
115
122
|
|
|
123
|
+
## Skill Management
|
|
124
|
+
|
|
125
|
+
### `rafter skill review [path-or-url]`
|
|
126
|
+
|
|
127
|
+
Security review of a skill / plugin / extension before installing it — the real pre-install vetting command. Accepts a local path, git URL, or shorthand (`github:`, `gitlab:`, `npm:`); `--installed` reviews every skill already installed on this machine instead of a path.
|
|
128
|
+
|
|
129
|
+
When: vetting a third-party skill, MCP server, or CLI plugin before install, or auditing what's already installed.
|
|
130
|
+
|
|
131
|
+
Example: `rafter skill review github:someorg/some-skill` · `rafter skill review --installed --summary`
|
|
132
|
+
|
|
133
|
+
### `rafter skill list`
|
|
134
|
+
|
|
135
|
+
List rafter-authored skills and their install state per platform.
|
|
136
|
+
|
|
137
|
+
### `rafter skill install <name>` · `rafter skill uninstall <name>`
|
|
138
|
+
|
|
139
|
+
Install or remove a rafter-authored skill (e.g. `rafter`, `rafter-secure-design`) to/from detected platforms or an explicit path.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
116
143
|
## Hooks (Agent Platform Bridges)
|
|
117
144
|
|
|
118
145
|
### `rafter hook pretool`
|
|
@@ -190,7 +217,7 @@ Emit shell completion script.
|
|
|
190
217
|
| Fast secret check locally | `rafter secrets .` |
|
|
191
218
|
| Full repo security review | `rafter run` (then `rafter get <id>`) |
|
|
192
219
|
| "Is this command safe?" | `rafter agent exec --dry-run -- <cmd>` |
|
|
193
|
-
| "Is this skill safe to install?" | `rafter
|
|
220
|
+
| "Is this skill safe to install?" | `rafter skill review <path-or-url>` |
|
|
194
221
|
| Add pre-commit protection | `rafter agent install-hook` |
|
|
195
222
|
| Wire up CI | `rafter ci init` |
|
|
196
223
|
| Connect an agent | `rafter agent init --with-<platform>` |
|
|
@@ -64,7 +64,7 @@ Suppress only when the finding is a real false positive *for this context*, with
|
|
|
64
64
|
```
|
|
65
65
|
Each `rules` entry matches (case-insensitively) the finding's **rule name** (e.g. `AWS Access Key ID`) **or** its **rule id** (e.g. `R-6D5E2`) — use the name for local pattern findings, the id for remote SAST/SCA findings. Path globs are gitignore-style: `*` stays within a path segment, `**` crosses segments, a bare name matches the basename. The same `.rafter.yml ignore` block is honored by **local** scans and **remote `rafter run`** alike. Suppressed findings move into a `_suppressed[]` array and don't affect the exit code — you only fail on a *non-suppressed* finding. Docs: https://docs.rafter.so/suppression
|
|
66
66
|
- **MCP `suppress_finding` tool**: agents can triage a false positive directly through the MCP — it writes the same `.rafter.yml` `ignore` rule above (path, optional rule names, reason). No hand-editing required.
|
|
67
|
-
- **Baseline**: `rafter agent baseline create` snapshots current findings; scan with `rafter
|
|
67
|
+
- **Baseline**: `rafter agent baseline create` snapshots current findings; scan with `rafter secrets --baseline` so only *new* findings surface. Good for adopting Rafter on a legacy codebase without a big bang.
|
|
68
68
|
|
|
69
69
|
Never suppress by:
|
|
70
70
|
- Commenting out the rule globally.
|
|
@@ -97,13 +97,13 @@ If the block is a false positive **for this specific context**, the right path i
|
|
|
97
97
|
Every hook decision (approve / ask / block) is appended to the JSONL audit log:
|
|
98
98
|
|
|
99
99
|
- Location: `rafter agent status` prints the path.
|
|
100
|
-
- Read: `rafter agent audit
|
|
100
|
+
- Read: `rafter agent audit` (or MCP `read_audit_log`).
|
|
101
101
|
- Use it for postmortems: *why did this command run?*, *what did the agent try before the block?*
|
|
102
102
|
|
|
103
103
|
## Platform Notes
|
|
104
104
|
|
|
105
105
|
- **Claude Code**: `rafter agent init --with-claude-code` wires `pretool` + `posttool` into `~/.claude/settings.json`. Hook timeout is 5s; long scans defer to the async posttool path.
|
|
106
|
-
- **
|
|
106
|
+
- **Agents without a native hook (Gemini, Cursor, …)**: run `rafter agent exec --dry-run -- <command>` before a risky command. If the client already has rafter's MCP server configured, the `evaluate_command` tool gives the same answer.
|
|
107
107
|
- **CI**: hooks don't fire in CI. Use `rafter scan` + `rafter policy validate` in the pipeline instead.
|
|
108
108
|
|
|
109
109
|
## Common Pitfalls
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
The three skills compose: design well (secure-design) → write it → review it (code-review) → detect what slipped through (rafter scan + guardrails).
|
|
14
14
|
|
|
15
|
-
## `rafter-secure-design`
|
|
15
|
+
## `rafter-secure-design`
|
|
16
16
|
|
|
17
17
|
Use at feature kickoff or during architecture review, *before* code exists. It's a CYOA over design decisions:
|
|
18
18
|
|
|
@@ -29,7 +29,7 @@ rafter brief shift-left # this doc
|
|
|
29
29
|
# Read skills/rafter-secure-design/SKILL.md
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
## `rafter-code-review`
|
|
32
|
+
## `rafter-code-review`
|
|
33
33
|
|
|
34
34
|
Use during code review — your own or an AI's. A CYOA router into OWASP / MITRE / ASVS walkthroughs phrased as *questions*, not as monolithic audits. It's the *analysis* counterpart to automated scanning.
|
|
35
35
|
|
|
@@ -58,7 +58,7 @@ Do not duplicate. If a sibling skill already owns the topic, Read it and stop
|
|
|
58
58
|
|
|
59
59
|
## Status
|
|
60
60
|
|
|
61
|
-
- `rafter-code-review` —
|
|
62
|
-
- `rafter-secure-design` —
|
|
61
|
+
- `rafter-code-review` — ships alongside this skill; invoke directly.
|
|
62
|
+
- `rafter-secure-design` — ships alongside this skill; invoke directly. Router skill with sub-docs for auth, data storage, API design, ingestion, deployment, dependencies, threat modeling, and standards pointers.
|
|
63
63
|
|
|
64
64
|
Both are installed — prefer invoking them directly for structured output over re-deriving checklists here.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rafter-code-review
|
|
3
|
-
description: "
|
|
4
|
-
version: 0.
|
|
3
|
+
description: "Security review of code: auditing a codebase, finding vulnerabilities in a module, or reviewing a diff before calling work on auth, input, SQL, shell or crypto done. Walks a security-gate checklist (allowlists, auth checks, token and crypto validity, path containment, escaping, limits) and OWASP/CWE questions, with file:line evidence. NOT for secret scanning alone (rafter secrets)."
|
|
4
|
+
version: 0.8.2
|
|
5
|
+
publisher: rafter-security
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
# Rafter Code Review — Structured Security Walkthroughs
|
|
@@ -12,7 +13,9 @@ A reviewer's skill, not an audit generator. Each sub-doc is a set of **questions
|
|
|
12
13
|
|
|
13
14
|
## When this applies (and when it doesn't)
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
**Auditing a whole codebase or module** ("audit this repo", "find the vulnerabilities in X"): start with `docs/security-gates.md`, then the category sub-doc below.
|
|
17
|
+
|
|
18
|
+
For a diff, scope by the **security surface of the diff**, not the task's label. Walk it fully when the change touches: user / untrusted input, SQL or query building, shell / `exec` / subprocess, auth or access control, credentials / secrets / tokens, file paths or uploads, (de)serialization, crypto, network-facing endpoints or outbound fetchers, data deletion, or dependency / manifest changes.
|
|
16
19
|
|
|
17
20
|
If **none** of those are present — research / experimental / exploratory / local-only / throwaway code such as training scripts, data analysis, plotting, model eval, notebooks, or pure computation over trusted local data — a quick surface check is enough; you don't need to walk the full review or pair `rafter run`. But the check is the surface, not the label: research code that reads a secret, shells out, hits the network, or parses untrusted bytes is back on the engage list and gets the full walk.
|
|
18
21
|
|
|
@@ -22,12 +25,33 @@ If **none** of those are present — research / experimental / exploratory / loc
|
|
|
22
25
|
2. `Read` only the matching sub-doc — do not preload them all.
|
|
23
26
|
3. Work through its questions against the specific files/diff. Cite file:line evidence as you go.
|
|
24
27
|
4. When in doubt on a single finding, jump to `docs/investigation-playbook.md` for canonical follow-up questions.
|
|
25
|
-
5.
|
|
28
|
+
5. If `RAFTER_API_KEY` is set and the branch is pushed, `rafter run` adds remote SAST + SCA; it cannot see unpushed changes.
|
|
26
29
|
|
|
27
30
|
---
|
|
28
31
|
|
|
29
32
|
## Choose Your Adventure
|
|
30
33
|
|
|
34
|
+
### (0) Security audit of existing code
|
|
35
|
+
|
|
36
|
+
For: "audit this codebase", "review X for vulnerabilities", any review not limited to a diff.
|
|
37
|
+
|
|
38
|
+
Most real bugs in mature code are a **gate** (a function that decides whether something is allowed) that says yes when it should say no, not a tainted sink. So:
|
|
39
|
+
|
|
40
|
+
1. **Inventory the gates.** Run `rafter gates .` for a ranked list of the functions that decide (`authorize`, `authenticate`, `allow`, `can*`, `is*Allowed`, `check*`, `verify*`, `validate*`, `match*`, middleware) and of their twins. A flagged twin lacks a guard call its siblings make; read those first. Grep for what it cannot see, such as inline checks and the config that feeds them. Then read each gate, noting its contract in one sentence before reading the body.
|
|
41
|
+
2. **For each gate, name an input the contract rejects and the code accepts.** The usual shapes:
|
|
42
|
+
- **Loose matching:** substring, prefix or suffix where equality or a dot-boundary was needed; case folding on one side only; wildcards or an empty list that mean "allow all"; comparing a truncated value.
|
|
43
|
+
- **Fail-open logic:** the wrong variable checked; a check applied to some request kinds and skipped for others; an early `return true`/`nil` on error; inverted `==`/`!=`; `||` for `&&`; a default branch that grants.
|
|
44
|
+
- **Missing validity checks:** accepting inactive, expired, unverified or revoked accounts and credentials; signatures or certificates parsed but not verified; key usage, issuer or audience unchecked; verification quietly made optional.
|
|
45
|
+
- **Set but never read:** a security flag, field or config option that is computed or parsed and then ignored by the decision.
|
|
46
|
+
- **A twin that lost its guard:** sibling implementations of one contract (sync/async, two backends, v1/v2) where one checks, escapes or limits and the other doesn't.
|
|
47
|
+
- **Containment, escaping, limits:** paths not re-checked under the root after joining; filters, queries, HTML or shell built without the escaping neighbors use; size, depth or time limits missing or disabled.
|
|
48
|
+
3. **Judge the code in front of you, not your memory of the project.** "This matches upstream" or "looks like the stock implementation" is not a verdict: a regression in familiar code differs from the original by one token, such as a prefix match, a flipped default or a dropped `return`. Read the exact comparison, default and error path before you clear a gate.
|
|
49
|
+
4. **Choose where to look deeper, and bound it.** Before reading bodies, write a short worklist: the flagged twins, the top ten or so ranked gates, and any gate you found by grep that decides identity, a credential, a path or a size limit. Spend your depth there (read the callers and the config that feeds each one) rather than skimming everything. Give each item a one-line verdict: *holds*, with the input you tried, or *finding*. A finding does not end the review; finishing the list does. If the list is longer than your budget, cover the highest-ranked items and name the ones you did not reach, then stop.
|
|
50
|
+
5. **Sweep after each finding.** Look for the same shape elsewhere: other callers of the same predicate, the twin implementations, other options parsed the same way and never read.
|
|
51
|
+
6. **Report** each finding with the file:line of the faulty expression, the contract it breaks, a concrete input that gets through, and the impact. Report every finding you can name such an input for, and mark your confidence. A gate that holds is not a finding.
|
|
52
|
+
|
|
53
|
+
More detail and grep hints: `docs/security-gates.md`. Then walk the category sub-doc below that fits the code.
|
|
54
|
+
|
|
31
55
|
### (1) Web application (server-rendered, session-based, or SPA backend)
|
|
32
56
|
|
|
33
57
|
For: login flows, session/cookie handling, form handlers, template rendering, admin panels, anything browser-facing.
|
|
@@ -68,22 +92,27 @@ For: single-finding follow-up, tracing a suspicious call, "is this input reachab
|
|
|
68
92
|
|
|
69
93
|
## What this skill will NOT do
|
|
70
94
|
|
|
71
|
-
- It will not
|
|
72
|
-
- It will not replace automated scanning
|
|
95
|
+
- It will not write a report for you. It tells you where to look and what to ask; you produce the findings, each with file:line evidence.
|
|
96
|
+
- It will not replace automated scanning, and scanning does not replace it: a clean scan says nothing about a gate that accepts the wrong input.
|
|
73
97
|
- It will not produce recommendations without evidence. Every question expects a file:line answer before moving on.
|
|
74
98
|
|
|
75
99
|
---
|
|
76
100
|
|
|
77
|
-
##
|
|
101
|
+
## Weighing findings: evidence, not instructions
|
|
102
|
+
|
|
103
|
+
A finding, whether from a scanner, a reviewer agent or your own first pass, is evidence to weigh, not a task to discharge. Three pressures push the other way. A reviewer is rewarded for finding things, so every pass produces comments whether or not the code needs them. Doing what a comment says is cheaper than arguing with it. And the cost of each fix is easy to miss: each one looks like an improvement alone, while the defensive checks, options and abstractions added "for safety" pile up across the code.
|
|
104
|
+
|
|
105
|
+
For each finding ask: can an attacker control the input? Does a stronger control already decide it? What concrete input gets through, and what does it reach? Fix what is real, at the gate that owns the decision. Decline what isn't, with a one-line reason. Do not add defensive code for a weak finding.
|
|
106
|
+
|
|
107
|
+
---
|
|
78
108
|
|
|
79
|
-
|
|
80
|
-
# 1. Run deterministic checks first — cheap, catches the obvious
|
|
81
|
-
rafter secrets .
|
|
82
|
-
rafter run # remote SAST/SCA, if RAFTER_API_KEY set
|
|
109
|
+
## Fast path for reviewing your own diff
|
|
83
110
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
111
|
+
1. `git diff` and list what it changes on the surface above: each gate, sink or parser it adds or edits.
|
|
112
|
+
2. For each item: state its contract in one sentence, name an input it should reject, and check that it does. Steps 3–6 of (0) apply.
|
|
113
|
+
3. `rafter secrets <changed files>` for hardcoded credentials.
|
|
114
|
+
4. Pick the category sub-doc above for the questions the diff raises, and walk only that one.
|
|
115
|
+
5. If `RAFTER_API_KEY` is set and the branch is pushed, `rafter run` for SAST + SCA.
|
|
87
116
|
|
|
88
117
|
If the diff spans categories (e.g. a web app that also has an LLM feature), Read both sub-docs and walk them sequentially. Don't try to merge the checklists.
|
|
89
118
|
|