@jetrabbits/agentic 0.0.3 → 0.0.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/AGENTS.md +6 -0
- package/README.md +1 -0
- package/areas/devops/ci-cd/prompts/release-pipeline.md +69 -79
- package/areas/devops/ci-cd/rules/supply-chain-security.md +39 -19
- package/areas/devops/ci-cd/skills/github-actions-patterns/SKILL.md +6 -1
- package/areas/devops/ci-cd/skills/pipeline-security/SKILL.md +54 -119
- package/areas/devops/ci-cd/workflows/release-pipeline.md +72 -62
- package/areas/devops/kubernetes/skills/pod-troubleshooting/SKILL.md +1 -1
- package/areas/devops/observability/rules/alerting-standards.md +37 -31
- package/areas/devops/observability/rules/golden-signals.md +29 -20
- package/areas/devops/observability/skills/distributed-tracing/SKILL.md +10 -1
- package/areas/software/backend/rules/security.md +32 -12
- package/areas/software/frontend/skills/component-design/SKILL.md +13 -1
- package/areas/software/full-stack/rules/security-guide.md +48 -12
- package/areas/software/security/prompts/security-scan.md +47 -55
- package/areas/software/security/rules/dependency-policy.md +43 -8
- package/areas/software/security/skills/dependency-audit/SKILL.md +46 -25
- package/areas/software/security/skills/threat-modeling/SKILL.md +26 -0
- package/package.json +1 -1
|
@@ -4,88 +4,80 @@ workflow: security-scan
|
|
|
4
4
|
|
|
5
5
|
# Prompt: `/security-scan`
|
|
6
6
|
|
|
7
|
-
Use when: running a
|
|
7
|
+
Use when: running a security scan that must produce actionable release decisions (`exploitable-now`, `not-reachable`, `accepted-risk`) rather than only raw scanner output.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
## Example 1 —
|
|
11
|
+
## Example 1 — Release gate with reachability triage and VEX output
|
|
12
12
|
|
|
13
13
|
**EN:**
|
|
14
14
|
```
|
|
15
15
|
/security-scan
|
|
16
16
|
|
|
17
|
-
Trigger: release candidate
|
|
18
|
-
Scope:
|
|
19
|
-
Stack: Python 3.12
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
Trigger: release candidate v4.2.0
|
|
18
|
+
Scope: SAST + dependency + secrets + IaC
|
|
19
|
+
Stack: Node.js 22, Python 3.12, Terraform
|
|
20
|
+
Policy:
|
|
21
|
+
- Block release for any Critical finding classified as exploitable-now
|
|
22
|
+
- High findings require remediation plan <= 72h or time-bound exception
|
|
23
|
+
Required output sections:
|
|
24
|
+
1) Findings summary by severity
|
|
25
|
+
2) Reachability analysis for each High/Critical dependency CVE
|
|
26
|
+
3) Classification table: exploitable-now / not-reachable / accepted-risk
|
|
27
|
+
4) VEX-style statements for not-reachable items with evidence
|
|
28
|
+
5) Exception register (owner, expiry, compensating controls)
|
|
24
29
|
```
|
|
25
30
|
|
|
26
31
|
**RU:**
|
|
27
32
|
```
|
|
28
33
|
/security-scan
|
|
29
34
|
|
|
30
|
-
Триггер: release candidate
|
|
31
|
-
Скоуп:
|
|
32
|
-
Стек: Python 3.12
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
Триггер: release candidate v4.2.0
|
|
36
|
+
Скоуп: SAST + зависимости + секреты + IaC
|
|
37
|
+
Стек: Node.js 22, Python 3.12, Terraform
|
|
38
|
+
Политика:
|
|
39
|
+
- Блокировать релиз при любом Critical, классифицированном как exploitable-now
|
|
40
|
+
- Для High нужен план устранения <= 72ч или ограниченное по времени исключение
|
|
41
|
+
Обязательные разделы результата:
|
|
42
|
+
1) Сводка находок по серьёзности
|
|
43
|
+
2) Reachability-анализ для каждого High/Critical dependency CVE
|
|
44
|
+
3) Таблица классификации: exploitable-now / not-reachable / accepted-risk
|
|
45
|
+
4) VEX-подобные записи для not-reachable с доказательствами
|
|
46
|
+
5) Реестр исключений (owner, expiry, compensating controls)
|
|
37
47
|
```
|
|
38
48
|
|
|
39
49
|
---
|
|
40
50
|
|
|
41
|
-
## Example 2 —
|
|
51
|
+
## Example 2 — Fast incident-mode scan focused on exploitability
|
|
42
52
|
|
|
43
53
|
**EN:**
|
|
44
54
|
```
|
|
45
55
|
/security-scan
|
|
46
56
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
Context: actively exploited CVE announced in a transitive dependency
|
|
58
|
+
Timebox: 90 minutes
|
|
59
|
+
Scope:
|
|
60
|
+
- Dependency path tracing to affected services
|
|
61
|
+
- Runtime reachability confirmation
|
|
62
|
+
- Exposure check for internet-facing routes
|
|
63
|
+
Output:
|
|
64
|
+
- List of impacted services sorted by exploitability risk
|
|
65
|
+
- Immediate mitigations (feature flags, traffic isolation, WAF rules)
|
|
66
|
+
- Patch and rollback plan
|
|
53
67
|
```
|
|
54
68
|
|
|
55
69
|
**RU:**
|
|
56
70
|
```
|
|
57
71
|
/security-scan
|
|
58
72
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## Example 3 — Dependency-only quick scan
|
|
70
|
-
|
|
71
|
-
**EN:**
|
|
72
|
-
```
|
|
73
|
-
/security-scan
|
|
74
|
-
|
|
75
|
-
Scope: dependency CVE audit only
|
|
76
|
-
Stack: Node.js 20 / Express, npm lockfile
|
|
77
|
-
Command: npm audit --audit-level=high
|
|
78
|
-
Auto-fix: apply non-breaking patches automatically (npm audit fix)
|
|
79
|
-
Report: list packages with unresolved High/Critical CVEs that need manual review
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**RU:**
|
|
83
|
-
```
|
|
84
|
-
/security-scan
|
|
85
|
-
|
|
86
|
-
Скоуп: только аудит CVE зависимостей
|
|
87
|
-
Стек: Node.js 20 / Express, npm lockfile
|
|
88
|
-
Команда: npm audit --audit-level=high
|
|
89
|
-
Авто-исправление: применить неломающие патчи автоматически (npm audit fix)
|
|
90
|
-
Отчёт: список пакетов с неустранёнными High/Critical CVE которые требуют ручного ревью
|
|
73
|
+
Контекст: опубликован активно эксплуатируемый CVE в транзитивной зависимости
|
|
74
|
+
Таймбокс: 90 минут
|
|
75
|
+
Скоуп:
|
|
76
|
+
- Трассировка dependency path до затронутых сервисов
|
|
77
|
+
- Подтверждение runtime reachability
|
|
78
|
+
- Проверка экспозиции интернет-facing маршрутов
|
|
79
|
+
Результат:
|
|
80
|
+
- Список затронутых сервисов, отсортированный по риску exploitability
|
|
81
|
+
- Немедленные mitigation-шаги (feature flags, изоляция трафика, WAF rules)
|
|
82
|
+
- План патча и отката
|
|
91
83
|
```
|
|
@@ -1,12 +1,47 @@
|
|
|
1
1
|
# Rule: Dependency Security Policy
|
|
2
2
|
|
|
3
|
-
**Priority**: P1 — Critical
|
|
3
|
+
**Priority**: P1 — Critical exploitable dependency risk blocks release; all accepted risks require owner + expiry.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Policy Model: Risk-Based, Not CVSS-Only
|
|
6
6
|
|
|
7
|
-
1.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
1. Triage by **exploitability context**:
|
|
8
|
+
- severity (CVSS),
|
|
9
|
+
- reachability from runtime code path,
|
|
10
|
+
- exposure boundary (internet-facing vs internal),
|
|
11
|
+
- presence of compensating controls.
|
|
12
|
+
2. A Critical CVE with confirmed reachable path is a deployment blocker.
|
|
13
|
+
3. High CVEs require remediation plan within 72h or formal exception.
|
|
14
|
+
|
|
15
|
+
## Mandatory CI Controls
|
|
16
|
+
|
|
17
|
+
4. Run dependency scanning on every PR and main build.
|
|
18
|
+
5. Enforce lockfiles and deterministic install modes.
|
|
19
|
+
6. Verify checksums/signatures when ecosystem tooling supports it.
|
|
20
|
+
7. Fail on prohibited licenses or policy-violating dependency sources.
|
|
21
|
+
|
|
22
|
+
## Provenance and Registry Trust
|
|
23
|
+
|
|
24
|
+
8. Prefer trusted publishers / verified maintainers where available.
|
|
25
|
+
9. Restrict package sources to approved registries/proxies.
|
|
26
|
+
10. Alert on maintainer transfer, suspicious install scripts, typosquatting indicators.
|
|
27
|
+
|
|
28
|
+
## Reachability and VEX
|
|
29
|
+
|
|
30
|
+
11. For each High/Critical finding, classify as:
|
|
31
|
+
- `exploitable-now`,
|
|
32
|
+
- `not-reachable`,
|
|
33
|
+
- `accepted-risk` (temporary).
|
|
34
|
+
12. Use VEX-compatible status where possible to document non-exploitable findings.
|
|
35
|
+
13. “Not reachable” claims require evidence (call graph, dependency path, runtime boundary).
|
|
36
|
+
|
|
37
|
+
## Exception Handling
|
|
38
|
+
|
|
39
|
+
14. Exceptions require: owner, justification, compensating controls, expiry date (max 30 days).
|
|
40
|
+
15. Expired exceptions automatically re-block deployments.
|
|
41
|
+
16. All exceptions reviewed in weekly security triage.
|
|
42
|
+
|
|
43
|
+
## Language/Stack Constraints
|
|
44
|
+
|
|
45
|
+
17. JavaScript/TypeScript: lockfile mandatory; block lifecycle scripts unless explicitly approved.
|
|
46
|
+
18. Python: hashes for production requirements (`--require-hashes`) when feasible.
|
|
47
|
+
19. Containers: base images pinned by digest; no floating tags in production images.
|
|
@@ -2,28 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
## When to load
|
|
4
4
|
|
|
5
|
-
When adding
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
5
|
+
When adding/updating dependencies, handling security findings, preparing releases, or reviewing supply-chain risk in PRs.
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Produce a dependency risk decision based on exploitability and business impact, not scanner output alone.
|
|
10
|
+
|
|
11
|
+
## Audit Workflow
|
|
12
|
+
|
|
13
|
+
1. **Inventory**
|
|
14
|
+
- Identify direct and transitive dependencies changed in PR/release.
|
|
15
|
+
- Record package source (registry), maintainer trust indicators, and version deltas.
|
|
16
|
+
|
|
17
|
+
2. **Scan**
|
|
18
|
+
- Run ecosystem-native audit tools + repository policy checks.
|
|
19
|
+
- Capture High/Critical findings with package path and affected components.
|
|
20
|
+
|
|
21
|
+
3. **Exploitability Triage**
|
|
22
|
+
- Determine runtime reachability (is vulnerable code path invoked?).
|
|
23
|
+
- Evaluate exposure (public endpoint, privileged process, internal-only).
|
|
24
|
+
- Assess mitigations (WAF, sandbox, feature flags, auth boundaries).
|
|
25
|
+
|
|
26
|
+
4. **Classify each finding**
|
|
27
|
+
- `exploitable-now` → block release, fix immediately.
|
|
28
|
+
- `not-reachable` → document evidence and add VEX status.
|
|
29
|
+
- `accepted-risk` → temporary exception with owner + expiry.
|
|
30
|
+
|
|
31
|
+
5. **Remediation Plan**
|
|
32
|
+
- Prefer upgrade to patched version.
|
|
33
|
+
- If upgrade is breaking: isolate vulnerability, add compensating controls, schedule upgrade milestone.
|
|
34
|
+
|
|
35
|
+
## Supply-Chain Red Flags
|
|
36
|
+
|
|
37
|
+
- Maintainer transfer shortly before suspicious release.
|
|
38
|
+
- Sudden dependency graph expansion unrelated to package purpose.
|
|
39
|
+
- install/postinstall scripts performing unexpected network activity.
|
|
40
|
+
- Obfuscated source in runtime package.
|
|
41
|
+
- Package source not in approved registries.
|
|
42
|
+
|
|
43
|
+
## Output Template (required)
|
|
44
|
+
|
|
45
|
+
- Dependency name and version delta
|
|
46
|
+
- Severity and advisory source
|
|
47
|
+
- Reachability evidence
|
|
48
|
+
- Classification (`exploitable-now` / `not-reachable` / `accepted-risk`)
|
|
49
|
+
- Decision and next action
|
|
50
|
+
- Owner and deadline
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: threat-modeling
|
|
3
|
+
type: skill
|
|
4
|
+
description: "Apply STRIDE threat modeling to system designs, identify IDOR and authorization vulnerabilities, and build threat matrices for security reviews. Use when the user designs a new system, reviews an architecture, prepares for a security audit, or asks about common API vulnerabilities like IDOR or broken access control."
|
|
5
|
+
related-rules:
|
|
6
|
+
- security-baseline.md
|
|
7
|
+
allowed-tools: Read, Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
1
10
|
# Skill: Threat Modeling
|
|
2
11
|
|
|
12
|
+
> **Expertise:** STRIDE framework, IDOR prevention, authorization boundary analysis, threat matrices for API and system security reviews.
|
|
13
|
+
|
|
3
14
|
## When to load
|
|
4
15
|
|
|
5
16
|
When designing a new system, adding an integration, reviewing an architecture, or preparing for a security review.
|
|
@@ -15,6 +26,14 @@ When designing a new system, adding an integration, reviewing an architecture, o
|
|
|
15
26
|
| **D**enial of Service | Can the service be made unavailable? | No rate limiting on public endpoints |
|
|
16
27
|
| **E**levation of Privilege | Can a low-privilege user gain higher access? | IDOR, broken object-level authorization |
|
|
17
28
|
|
|
29
|
+
## Threat Modeling Workflow
|
|
30
|
+
|
|
31
|
+
1. **Identify assets** — list sensitive data, APIs, and trust boundaries in the system
|
|
32
|
+
2. **Apply STRIDE** — walk through each threat category against every asset and boundary
|
|
33
|
+
3. **Score risks** — rank by likelihood × impact (Critical / High / Medium / Low)
|
|
34
|
+
4. **Prioritize mitigations** — address Critical/High first; document accepted risks for Medium/Low
|
|
35
|
+
5. **Validate** — verify mitigations with code review, SAST/DAST scans, or penetration testing
|
|
36
|
+
|
|
18
37
|
## IDOR — Most Common API Vulnerability
|
|
19
38
|
|
|
20
39
|
```python
|
|
@@ -34,3 +53,10 @@ def get_invoice(invoice_id: int, current_user: User = Depends(get_current_user))
|
|
|
34
53
|
raise HTTPException(status_code=404) # 404, not 403
|
|
35
54
|
return invoice
|
|
36
55
|
```
|
|
56
|
+
|
|
57
|
+
## Common Mistakes
|
|
58
|
+
|
|
59
|
+
- **Returning 403 instead of 404** — reveals that the resource exists, enabling enumeration
|
|
60
|
+
- **Client-side authorization only** — always enforce ownership and role checks server-side
|
|
61
|
+
- **Missing audit logs for sensitive actions** — makes repudiation threats undetectable
|
|
62
|
+
- **Trusting internal service-to-service calls** — apply zero-trust; validate JWTs at every boundary
|