@aiwg/flue 2026.11.2 → 2026.11.4
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/package.json +9 -1
- package/skills/address-issues/SKILL.md +30 -24
- package/skills/address-issues/references/milestone.md +208 -0
- package/skills/address-issues/scripts/milestone-plan.mjs +109 -0
- package/skills/aiwg-issue/SKILL.md +18 -0
- package/skills/aiwg-pr/SKILL.md +18 -0
- package/skills/aiwg-refresh/SKILL.md +3 -0
- package/skills/aiwg-utils-quickref/SKILL.md +7 -0
- package/skills/commit-and-push/SKILL.md +18 -0
- package/skills/exposure-analysis/SKILL.md +144 -0
- package/skills/exposure-analysis/SKILL.md.d.ts +3 -0
- package/skills/exposure-analysis/scripts/analyze.mjs +133 -0
- package/skills/exposure-analysis/scripts/firewall.mjs +113 -0
- package/skills/forensics-quickref/SKILL.md +17 -0
- package/skills/host-hardening/SKILL.md +150 -0
- package/skills/host-hardening/SKILL.md.d.ts +3 -0
- package/skills/host-hardening/scripts/bindings.mjs +48 -0
- package/skills/host-hardening/scripts/check.mjs +71 -0
- package/skills/issue-create/SKILL.md +5 -5
- package/skills/sdlc-quickref/SKILL.md +7 -0
- package/skills/security-engineering-quickref/SKILL.md +20 -0
- package/skills/use/SKILL.md +3 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Produce a hardening baseline and operator-only remediation plan from safe metadata.
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { checkCompose, checkDockerRun } from './bindings.mjs';
|
|
4
|
+
|
|
5
|
+
const controls = [
|
|
6
|
+
['ssh.passwordAuthentication', 'no', 'Disable password authentication after access gates', '/etc/ssh/sshd_config'],
|
|
7
|
+
['ssh.permitRootLogin', 'no', 'Disable root login after access gates', '/etc/ssh/sshd_config'],
|
|
8
|
+
['ssh.maxAuthTries', 3, 'Limit MaxAuthTries to at most 3', '/etc/ssh/sshd_config'],
|
|
9
|
+
['ssh.caTrustReviewed', true, 'Review TrustedUserCAKeys and principals without collecting key material', '/etc/ssh/sshd_config'],
|
|
10
|
+
['ssh.authorizedKeysFromRestricted', true, 'Constrain authorized_keys with from=; operator supplies boolean only', 'authorized_keys (operator-owned)'],
|
|
11
|
+
['firewall.defaultDeny4', true, 'Default-deny IPv4 inbound', 'IPv4 firewall rules'],
|
|
12
|
+
['firewall.defaultDeny6', true, 'Default-deny IPv6 inbound', 'IPv6 firewall rules'],
|
|
13
|
+
['firewall.persistent', true, 'Verify persisted rules and boot loading', 'firewall persistence configuration'],
|
|
14
|
+
['docker.userGuard', true, 'Review ordered DOCKER-USER ingress guard', 'Docker firewall rules'],
|
|
15
|
+
['docker.afterVpn', true, 'Order Docker after VPN readiness, including restart behavior', 'Docker service drop-in'],
|
|
16
|
+
['docker.liveRestore', true, 'Enable Docker live-restore where supported', '/etc/docker/daemon.json'],
|
|
17
|
+
['docker.explicitBinds', true, 'Specify private/VPN bind addresses in rendered Compose and docker run', 'compose.yaml'],
|
|
18
|
+
['datastores.authAcl', true, 'Require datastore authentication and least-privilege ACLs', 'datastore configuration'],
|
|
19
|
+
['datastores.redisDangerousCommandsRestricted', true, 'Deny dangerous Redis commands through ACLs; review version-specific alternatives', 'Redis ACL configuration'],
|
|
20
|
+
['datastores.postgresConnectionLogging', true, 'Enable PostgreSQL connection logging', 'PostgreSQL configuration'],
|
|
21
|
+
['datastores.appRolesNotSuperuser', true, 'Remove superuser from application roles after dependency review', 'PostgreSQL role definitions'],
|
|
22
|
+
['exporters.privateBind', true, 'Bind exporters to private/VPN interfaces', 'exporter configuration'],
|
|
23
|
+
['exporters.fixedTargets', true, 'Disable caller-chosen multi-target exporter scrapes', 'exporter configuration'],
|
|
24
|
+
['audit.rulesLoaded', true, 'Review auditd rules against sensitive file and authentication events', 'auditd rules'],
|
|
25
|
+
['audit.retentionReviewed', true, 'Review audit/log retention capacity and remote preservation', 'auditd and journal retention configuration'],
|
|
26
|
+
];
|
|
27
|
+
const valueAt = (data, path) => path.split('.').reduce((value, part) => value?.[part], data);
|
|
28
|
+
try {
|
|
29
|
+
const args = process.argv.slice(2);
|
|
30
|
+
if (args.some(arg => ['--apply', '--authorized'].includes(arg))) throw new Error('read-only skill: operator must execute separately reviewed changes; apply is unavailable');
|
|
31
|
+
const options = {};
|
|
32
|
+
for (let i = 0; i < args.length; i += 2) {
|
|
33
|
+
if (!['--snapshot', '--compose', '--docker-run'].includes(args[i]) || !args[i + 1]) throw new Error('Usage: check.mjs --snapshot safe.json [--compose compose.yaml] [--docker-run commands.txt]');
|
|
34
|
+
options[args[i]] = args[i + 1];
|
|
35
|
+
}
|
|
36
|
+
if (!options['--snapshot']) throw new Error('--snapshot is required');
|
|
37
|
+
const data = JSON.parse(readFileSync(options['--snapshot'], 'utf8'));
|
|
38
|
+
if (!data.host || !Number.isFinite(Date.parse(data.capturedAt))) throw new Error('host and ISO capturedAt required');
|
|
39
|
+
const checks = controls.map(([id, expected, recommendation, file]) => {
|
|
40
|
+
const actual = valueAt(data.baseline, id);
|
|
41
|
+
const known = typeof actual === typeof expected;
|
|
42
|
+
const pass = id === 'ssh.maxAuthTries' ? Number.isInteger(actual) && actual > 0 && actual <= expected : actual === expected;
|
|
43
|
+
return { id, status: !known ? 'UNKNOWN' : pass ? 'PASS' : 'FAIL', recommendation, file };
|
|
44
|
+
});
|
|
45
|
+
const findings = [];
|
|
46
|
+
if (options['--compose']) findings.push(...checkCompose(readFileSync(options['--compose'], 'utf8')).map(finding => ({ ...finding, file: options['--compose'] })));
|
|
47
|
+
if (options['--docker-run']) findings.push(...checkDockerRun(readFileSync(options['--docker-run'], 'utf8')).map(finding => ({ ...finding, file: options['--docker-run'] })));
|
|
48
|
+
const changes = checks.filter(check => check.status === 'FAIL');
|
|
49
|
+
const diff = changes.map(check => {
|
|
50
|
+
const names = { 'ssh.passwordAuthentication': 'PasswordAuthentication', 'ssh.permitRootLogin': 'PermitRootLogin', 'ssh.maxAuthTries': 'MaxAuthTries' };
|
|
51
|
+
const name = names[check.id];
|
|
52
|
+
return name ? `--- ${check.file}\n-${name} ${valueAt(data.baseline, check.id)}\n+${name} ${controls.find(control => control[0] === check.id)[1]}`
|
|
53
|
+
: `--- ${check.file}\n- control ${check.id}: failed\n+ recommendation: ${check.recommendation}`;
|
|
54
|
+
}).concat(findings.map(finding => `--- ${finding.file} (${finding.location})\n- ${finding.code}: current publish requires review\n+ use operator-reviewed private/VPN bind; retain required service reachability`)).join('\n');
|
|
55
|
+
const datedSuffix = new Date(data.capturedAt).toISOString().replace('.000', '').replaceAll(':', '-');
|
|
56
|
+
const backups = [...new Set([...changes.map(check => check.file), ...findings.map(finding => finding.file)])].map(file => ({ action: 'operator-backup', file, datedSuffix,
|
|
57
|
+
verify: 'Record SHA-256 before change, restrict access, verify restore procedure; never copy secrets into the report' }));
|
|
58
|
+
const failed = changes.length + findings.length;
|
|
59
|
+
const unknown = checks.filter(check => check.status === 'UNKNOWN').length;
|
|
60
|
+
const report = { host: data.host, capturedAt: data.capturedAt, mode: 'read-only', checks, findings,
|
|
61
|
+
plan: { backups, diff, ruleReview: 'Review exposure-analysis stale and over-broad rules; map each removal to owner and named service before preparing exact diffs',
|
|
62
|
+
gates: ['explicit operator authorization', 'verified key-based access', 'verified console break-glass access'],
|
|
63
|
+
safety: ['HIGH blast radius for network/auth changes', 'Test sshd effective Match contexts and syntax before reload',
|
|
64
|
+
'Keep current SSH session and timed rollback; validate second key session before retiring old access',
|
|
65
|
+
'Operator takes dated backups before any separately authorized application; this skill never applies'],
|
|
66
|
+
reverify: ['listeners', 'IPv4 firewall', 'IPv6 firewall', 'Docker forwarding and binds', 'new key-based SSH session', ...(data.healthChecks ?? [])],
|
|
67
|
+
execution: 'Operator applies outside this read-only skill, then supplies fresh captures and named health results for a new report; no apply is performed or claimed' },
|
|
68
|
+
summary: { status: failed ? 'FAIL' : unknown ? 'UNKNOWN' : 'PASS', passed: checks.filter(check => check.status === 'PASS').length, failed, unknown } };
|
|
69
|
+
process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
|
|
70
|
+
process.exitCode = failed ? 2 : unknown ? 3 : 0;
|
|
71
|
+
} catch (error) { process.stderr.write(`${error.message}\n`); process.exitCode = 1; }
|
|
@@ -226,11 +226,11 @@ skill or the same composer; they may not jump directly to a tracker create API.
|
|
|
226
226
|
|
|
227
227
|
### Step 6: HITL checkpoint before each write
|
|
228
228
|
|
|
229
|
-
Build the descriptor from the resolved backend's actual pending effects, never from the draft body, composition output, or model claims:
|
|
230
|
-
category, resolved repo, execution environment, every affected repo-relative
|
|
229
|
+
Before asking the person to authorize each write, MUST run lookup-before-ask. Build the descriptor from the resolved backend's actual pending effects, never from the draft body, composition output, or model claims:
|
|
230
|
+
category, resolved repo/target/verb, execution environment, every affected repo-relative
|
|
231
231
|
path, reversibility, and impact. Local file creation with a complete rollback
|
|
232
232
|
is `repo.edit`: include the real host `actor` and `inputDigest` (SHA-256 of the exact serialized pending tool name and all input fields, including every file byte); remote tracker creation/cross-links are `tracker.write` and
|
|
233
|
-
|
|
233
|
+
require a scoped durable grant or explicit review. Include index/metadata writes and sibling
|
|
234
234
|
links; do not describe remote writes as local file edits. Policy-preflight
|
|
235
235
|
exceptions are `threat.override`, which cannot be auto-authorized.
|
|
236
236
|
|
|
@@ -238,8 +238,8 @@ exceptions are `threat.override`, which cannot be auto-authorized.
|
|
|
238
238
|
aiwg config authorization check --action-file "$ACTION_FILE" --target "$TARGET_REPO"
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
Use a private temporary action file built by the host. Only `auto-authorized`
|
|
242
|
-
|
|
241
|
+
Use a private temporary action file built by the host. Only `auto-authorized` with a receipt
|
|
242
|
+
permits that exact write without prompting. The helper writes
|
|
243
243
|
the signed receipt before returning. On `escalate`, retain today's prompt; on
|
|
244
244
|
`deny`, retain today's refusal. Missing receipt, invalid output, or errors keep
|
|
245
245
|
the existing review path. Platform prompts are never bypassed. Recheck every
|
|
@@ -72,7 +72,14 @@ aiwg discover "concept to inception" # → flow-concept-to-inception
|
|
|
72
72
|
|
|
73
73
|
### Continuous workflows
|
|
74
74
|
|
|
75
|
+
For a milestone of bounded issues, load `address-issues` and follow
|
|
76
|
+
`--milestone <name> --dispatch workers [--dry-run]`. This is the first route for
|
|
77
|
+
"get the engineering track going"; Delivery Track is for a full iteration.
|
|
78
|
+
|
|
75
79
|
```bash
|
|
80
|
+
aiwg discover "work through this milestone with workers" # → address-issues (first; milestone mode)
|
|
81
|
+
aiwg discover "work this milestone" # → address-issues (milestone mode)
|
|
82
|
+
aiwg discover "get the engineering track going" # → address-issues (milestone mode)
|
|
76
83
|
aiwg discover "risk management cycle" # → flow-risk-management-cycle (score 0.93)
|
|
77
84
|
aiwg discover "execute test strategy" # → flow-test-strategy-execution
|
|
78
85
|
aiwg discover "performance optimization cycle" # → flow-performance-optimization
|
|
@@ -50,6 +50,8 @@ This is **not** a vulnerability scanner or pen-test framework. It is a thinking-
|
|
|
50
50
|
| **Physical threats** | Threats STRIDE and OWASP Top 10 don't cover |
|
|
51
51
|
| **DFIR readiness** | Preparing evidence handling, custody expectations, and handoff to forensics-complete |
|
|
52
52
|
|
|
53
|
+
| **Host hardening** | Read-only host baseline, lockout-safe remediation plans and static published-port binds |
|
|
54
|
+
|
|
53
55
|
## Curated discovery phrases
|
|
54
56
|
|
|
55
57
|
### Cryptographic primitives
|
|
@@ -125,6 +127,23 @@ aiwg discover "incident response evidence" # → dfir-readiness or forensics
|
|
|
125
127
|
aiwg discover "chain of custody readiness" # → dfir-readiness
|
|
126
128
|
```
|
|
127
129
|
|
|
130
|
+
### Host hardening and firewall exposure
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
aiwg discover "system hardening" # → host-hardening
|
|
134
|
+
aiwg discover "firewall analysis" # → forensics exposure-analysis
|
|
135
|
+
aiwg discover "docker published ports" # → exposure-analysis / published-port-binding
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`host-hardening` reviews SSH key/console access, persistent default-deny,
|
|
139
|
+
Docker/VPN ordering, datastore ACLs, exporter targets and audit retention.
|
|
140
|
+
It produces dated backup requirements, diff-style plans and named health
|
|
141
|
+
rechecks; it never applies host changes, even with an apply request. The static
|
|
142
|
+
checker flags missing Compose/docker run bind addresses. `published-port-binding`
|
|
143
|
+
governs repository changes. For post-deploy/monthly checks, consume fresh
|
|
144
|
+
sanitized captures and alert on FAIL or UNKNOWN summaries through existing
|
|
145
|
+
operator scheduling. `exposure-analysis` owns actual firewall reconstruction.
|
|
146
|
+
|
|
128
147
|
## Anti-patterns each skill rejects
|
|
129
148
|
|
|
130
149
|
| Skill | Anti-patterns it identifies |
|
|
@@ -166,6 +185,7 @@ This framework ships 4 applied-cryptography rules into the rules index:
|
|
|
166
185
|
- `no-key-reuse-across-purposes`
|
|
167
186
|
- `no-adhoc-kdf`
|
|
168
187
|
- `crypto-flag-verification`
|
|
188
|
+
- `published-port-binding` — explicit Docker publish binds and exposure review
|
|
169
189
|
|
|
170
190
|
These deploy via the standard rules-index pipeline.
|
|
171
191
|
|
package/skills/use/SKILL.md
CHANGED
|
@@ -32,6 +32,9 @@ Alternate expressions and non-obvious activations (primary phrases are matched a
|
|
|
32
32
|
|
|
33
33
|
## Behavior
|
|
34
34
|
|
|
35
|
+
Any removal list requires explicit human review of the listed removals before execution.
|
|
36
|
+
Authorization lookup must never bypass that review, even with a receipt for other effects.
|
|
37
|
+
|
|
35
38
|
When triggered:
|
|
36
39
|
|
|
37
40
|
1. **Extract intent**:
|