@pentoshi/clai 4.19.0 → 5.1.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/CHANGELOG.md +119 -0
- package/PROVIDERS.md +15 -2
- package/REA.md +96 -0
- package/README.md +5 -1
- package/dist/agent/compaction/compaction-prompt.d.ts +49 -0
- package/dist/agent/compaction/compaction-prompt.js +164 -0
- package/dist/agent/compaction/compaction-prompt.js.map +1 -0
- package/dist/agent/compaction/memory-sections.d.ts +27 -0
- package/dist/agent/compaction/memory-sections.js +144 -0
- package/dist/agent/compaction/memory-sections.js.map +1 -0
- package/dist/agent/compaction-summary.d.ts +2 -33
- package/dist/agent/compaction-summary.js +3 -113
- package/dist/agent/compaction-summary.js.map +1 -1
- package/dist/agent/context/compact-with-summary.d.ts +2 -4
- package/dist/agent/context/compact-with-summary.js +45 -68
- package/dist/agent/context/compact-with-summary.js.map +1 -1
- package/dist/agent/context/compaction-recent-history.d.ts +4 -3
- package/dist/agent/context/compaction-recent-history.js +30 -52
- package/dist/agent/context/compaction-recent-history.js.map +1 -1
- package/dist/agent/context/compaction-skills.d.ts +4 -0
- package/dist/agent/context/compaction-skills.js +136 -0
- package/dist/agent/context/compaction-skills.js.map +1 -0
- package/dist/agent/context/compaction-user-instructions.d.ts +5 -6
- package/dist/agent/context/compaction-user-instructions.js +156 -231
- package/dist/agent/context/compaction-user-instructions.js.map +1 -1
- package/dist/agent/context-manager.js +20 -8
- package/dist/agent/context-manager.js.map +1 -1
- package/dist/agent/events.d.ts +10 -0
- package/dist/agent/loop-guard.d.ts +1 -0
- package/dist/agent/loop-guard.js +29 -6
- package/dist/agent/loop-guard.js.map +1 -1
- package/dist/agent/outcomes.js +4 -0
- package/dist/agent/outcomes.js.map +1 -1
- package/dist/agent/parser/arg-formatting.js +8 -2
- package/dist/agent/parser/arg-formatting.js.map +1 -1
- package/dist/agent/parser/dsml.d.ts +30 -0
- package/dist/agent/parser/dsml.js +233 -0
- package/dist/agent/parser/dsml.js.map +1 -0
- package/dist/agent/parser/vendor-protocols.d.ts +2 -5
- package/dist/agent/parser/vendor-protocols.js +4 -93
- package/dist/agent/parser/vendor-protocols.js.map +1 -1
- package/dist/agent/plan-implement-compact.js +2 -2
- package/dist/agent/plan-implement-compact.js.map +1 -1
- package/dist/agent/reliability-policy.d.ts +3 -1
- package/dist/agent/reliability-policy.js +21 -31
- package/dist/agent/reliability-policy.js.map +1 -1
- package/dist/agent/runner.js +12 -1
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/subagents/read-only-tools.js +7 -8
- package/dist/agent/subagents/read-only-tools.js.map +1 -1
- package/dist/agent/tool-call-parser.js +6 -8
- package/dist/agent/tool-call-parser.js.map +1 -1
- package/dist/agent/turn/event-emitter.js +2 -0
- package/dist/agent/turn/event-emitter.js.map +1 -1
- package/dist/agent/turn/loop/answer-path.js +3 -1
- package/dist/agent/turn/loop/answer-path.js.map +1 -1
- package/dist/agent/turn/loop/canonicalize-turn-call.js +5 -3
- package/dist/agent/turn/loop/canonicalize-turn-call.js.map +1 -1
- package/dist/agent/turn/loop/native-tool-calls.js +2 -2
- package/dist/agent/turn/loop/native-tool-calls.js.map +1 -1
- package/dist/agent/turn/loop/output-budget.d.ts +0 -1
- package/dist/agent/turn/loop/output-budget.js +5 -13
- package/dist/agent/turn/loop/output-budget.js.map +1 -1
- package/dist/agent/turn/loop/pending-tool-calls.d.ts +16 -0
- package/dist/agent/turn/loop/pending-tool-calls.js +53 -0
- package/dist/agent/turn/loop/pending-tool-calls.js.map +1 -0
- package/dist/agent/turn/loop/request-assembly.js +39 -33
- package/dist/agent/turn/loop/request-assembly.js.map +1 -1
- package/dist/agent/turn/loop/round-request.js +32 -18
- package/dist/agent/turn/loop/round-request.js.map +1 -1
- package/dist/agent/turn/loop/run-rounds.js +2 -2
- package/dist/agent/turn/loop/run-rounds.js.map +1 -1
- package/dist/agent/turn/loop/stream-session.d.ts +5 -7
- package/dist/agent/turn/loop/stream-session.js +43 -31
- package/dist/agent/turn/loop/stream-session.js.map +1 -1
- package/dist/agent/turn/loop/tool-call-recovery.d.ts +2 -0
- package/dist/agent/turn/loop/tool-call-recovery.js +26 -11
- package/dist/agent/turn/loop/tool-call-recovery.js.map +1 -1
- package/dist/agent/turn/mcp-agent-tools.d.ts +3 -0
- package/dist/agent/turn/mcp-agent-tools.js +11 -2
- package/dist/agent/turn/mcp-agent-tools.js.map +1 -1
- package/dist/agent/turn/prompt-sections.js +1 -0
- package/dist/agent/turn/prompt-sections.js.map +1 -1
- package/dist/agent/turn/scaffold-preflight.d.ts +6 -1
- package/dist/agent/turn/scaffold-preflight.js +10 -2
- package/dist/agent/turn/scaffold-preflight.js.map +1 -1
- package/dist/agent/turn/setup/mcp-agent-ports.d.ts +5 -1
- package/dist/agent/turn/setup/mcp-agent-ports.js +2 -0
- package/dist/agent/turn/setup/mcp-agent-ports.js.map +1 -1
- package/dist/agent/turn/system-sections.d.ts +2 -0
- package/dist/agent/turn/system-sections.js +12 -8
- package/dist/agent/turn/system-sections.js.map +1 -1
- package/dist/agent/turn/tool-execution/deps.d.ts +2 -0
- package/dist/agent/turn/tool-execution/single-tool.js +4 -1
- package/dist/agent/turn/tool-execution/single-tool.js.map +1 -1
- package/dist/agent/turn/tool-result-recorder.js +1 -0
- package/dist/agent/turn/tool-result-recorder.js.map +1 -1
- package/dist/agent/turn/turn-counters.d.ts +1 -0
- package/dist/agent/turn/turn-counters.js +2 -0
- package/dist/agent/turn/turn-counters.js.map +1 -1
- package/dist/agent/turn/workspace-setup.d.ts +7 -2
- package/dist/agent/turn/workspace-setup.js +45 -30
- package/dist/agent/turn/workspace-setup.js.map +1 -1
- package/dist/agent/workspace-orient.d.ts +4 -0
- package/dist/agent/workspace-orient.js +83 -37
- package/dist/agent/workspace-orient.js.map +1 -1
- package/dist/app/adapters/agent-event-adapter.d.ts +2 -0
- package/dist/app/adapters/agent-event-adapter.js +32 -2
- package/dist/app/adapters/agent-event-adapter.js.map +1 -1
- package/dist/app/adapters/current-agent-adapter.js +1 -0
- package/dist/app/adapters/current-agent-adapter.js.map +1 -1
- package/dist/app/adapters/current-store-adapter.js +3 -0
- package/dist/app/adapters/current-store-adapter.js.map +1 -1
- package/dist/app/commands/catalog.js +10 -4
- package/dist/app/commands/catalog.js.map +1 -1
- package/dist/app/controllers/session-compact-helper.js +2 -5
- package/dist/app/controllers/session-compact-helper.js.map +1 -1
- package/dist/app/controllers/session-controller.js +34 -3
- package/dist/app/controllers/session-controller.js.map +1 -1
- package/dist/app/controllers/session-prompt-queue.d.ts +13 -1
- package/dist/app/controllers/session-prompt-queue.js +96 -24
- package/dist/app/controllers/session-prompt-queue.js.map +1 -1
- package/dist/app/controllers/turn-controller.d.ts +1 -0
- package/dist/app/controllers/turn-controller.js +14 -1
- package/dist/app/controllers/turn-controller.js.map +1 -1
- package/dist/app/events/app-event.d.ts +5 -0
- package/dist/app/events/app-event.js.map +1 -1
- package/dist/app/ports/agent-port.d.ts +1 -0
- package/dist/app/ports/persistence-port.d.ts +7 -0
- package/dist/app/ports/transcript-item.d.ts +2 -0
- package/dist/classic/app/app-wiring.d.ts +5 -2
- package/dist/classic/app/app-wiring.js +7 -3
- package/dist/classic/app/app-wiring.js.map +1 -1
- package/dist/classic/app/paint-pacing.js +2 -2
- package/dist/classic/app/paint-pacing.js.map +1 -1
- package/dist/classic/app/use-feed.js +7 -9
- package/dist/classic/app/use-feed.js.map +1 -1
- package/dist/classic/app/wiring-disclosure.js +1 -1
- package/dist/classic/app/wiring-disclosure.js.map +1 -1
- package/dist/classic/app/wiring-feed-scroll.d.ts +5 -0
- package/dist/classic/app/wiring-feed-scroll.js +39 -0
- package/dist/classic/app/wiring-feed-scroll.js.map +1 -0
- package/dist/classic/app/wiring-interactions.d.ts +0 -3
- package/dist/classic/app/wiring-interactions.js +6 -28
- package/dist/classic/app/wiring-interactions.js.map +1 -1
- package/dist/classic/app/wiring-lifecycle.d.ts +1 -0
- package/dist/classic/app/wiring-lifecycle.js +11 -1
- package/dist/classic/app/wiring-lifecycle.js.map +1 -1
- package/dist/classic/app/wiring-selection.js +46 -37
- package/dist/classic/app/wiring-selection.js.map +1 -1
- package/dist/classic/app/wiring-types.d.ts +5 -2
- package/dist/classic/blocks/intro-lines.js +1 -0
- package/dist/classic/blocks/intro-lines.js.map +1 -1
- package/dist/classic/blocks/thinking-lines.d.ts +6 -0
- package/dist/classic/blocks/thinking-lines.js +22 -7
- package/dist/classic/blocks/thinking-lines.js.map +1 -1
- package/dist/classic/blocks/tool-lines.js +9 -4
- package/dist/classic/blocks/tool-lines.js.map +1 -1
- package/dist/classic/blocks/turn-summary-lines.d.ts +1 -1
- package/dist/classic/blocks/turn-summary-lines.js +5 -3
- package/dist/classic/blocks/turn-summary-lines.js.map +1 -1
- package/dist/classic/bootstrap/start-classic.js +4 -1
- package/dist/classic/bootstrap/start-classic.js.map +1 -1
- package/dist/classic/chrome/composer-mentions.js +2 -1
- package/dist/classic/chrome/composer-mentions.js.map +1 -1
- package/dist/classic/chrome/directory-row.js +5 -5
- package/dist/classic/chrome/directory-row.js.map +1 -1
- package/dist/classic/chrome/status-rows.d.ts +2 -1
- package/dist/classic/chrome/status-rows.js +18 -8
- package/dist/classic/chrome/status-rows.js.map +1 -1
- package/dist/classic/feed/feed-blocks.js +6 -4
- package/dist/classic/feed/feed-blocks.js.map +1 -1
- package/dist/classic/feed/transcript-selection.d.ts +2 -1
- package/dist/classic/feed/transcript-selection.js +15 -10
- package/dist/classic/feed/transcript-selection.js.map +1 -1
- package/dist/classic/panels/confirm-panel.js +1 -0
- package/dist/classic/panels/confirm-panel.js.map +1 -1
- package/dist/classic/panels/jobs-panel.js +1 -1
- package/dist/classic/panels/jobs-panel.js.map +1 -1
- package/dist/classic/panels/plan-panel.js +1 -1
- package/dist/classic/panels/plan-panel.js.map +1 -1
- package/dist/classic/render/shell-width.js +1 -1
- package/dist/classic/render/shell-width.js.map +1 -1
- package/dist/classic/render/widest-line.d.ts +1 -0
- package/dist/classic/render/widest-line.js +5 -0
- package/dist/classic/render/widest-line.js.map +1 -0
- package/dist/commands/doctor.js +2 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/instructions/scaffold.js +2 -1
- package/dist/instructions/scaffold.js.map +1 -1
- package/dist/llm/agentrouter.js +6 -11
- package/dist/llm/agentrouter.js.map +1 -1
- package/dist/llm/anthropic.js +6 -8
- package/dist/llm/anthropic.js.map +1 -1
- package/dist/llm/bynara.js +6 -10
- package/dist/llm/bynara.js.map +1 -1
- package/dist/llm/capabilities.js +5 -5
- package/dist/llm/capabilities.js.map +1 -1
- package/dist/llm/capability/state.d.ts +1 -1
- package/dist/llm/capability/tool-dialect.js +1 -0
- package/dist/llm/capability/tool-dialect.js.map +1 -1
- package/dist/llm/capability/vision-patterns.js +1 -0
- package/dist/llm/capability/vision-patterns.js.map +1 -1
- package/dist/llm/capability/vision-registry.js +1 -1
- package/dist/llm/capability/vision-registry.js.map +1 -1
- package/dist/llm/cline.js +3 -2
- package/dist/llm/cline.js.map +1 -1
- package/dist/llm/codex-models.d.ts +1 -1
- package/dist/llm/codex-models.js +11 -6
- package/dist/llm/codex-models.js.map +1 -1
- package/dist/llm/codex.js +2 -1
- package/dist/llm/codex.js.map +1 -1
- package/dist/llm/constellation.js +5 -0
- package/dist/llm/constellation.js.map +1 -1
- package/dist/llm/context-windows.js +17 -13
- package/dist/llm/context-windows.js.map +1 -1
- package/dist/llm/copilot.js +19 -21
- package/dist/llm/copilot.js.map +1 -1
- package/dist/llm/custom-providers.d.ts +2 -1
- package/dist/llm/custom-providers.js +16 -10
- package/dist/llm/custom-providers.js.map +1 -1
- package/dist/llm/deepseek.js +6 -11
- package/dist/llm/deepseek.js.map +1 -1
- package/dist/llm/explabs.js +8 -9
- package/dist/llm/explabs.js.map +1 -1
- package/dist/llm/fireworks.js +9 -11
- package/dist/llm/fireworks.js.map +1 -1
- package/dist/llm/free-default-model.js +5 -3
- package/dist/llm/free-default-model.js.map +1 -1
- package/dist/llm/free-model-limits.js +2 -1
- package/dist/llm/free-model-limits.js.map +1 -1
- package/dist/llm/free.js +20 -23
- package/dist/llm/free.js.map +1 -1
- package/dist/llm/freebuff-models.js +11 -2
- package/dist/llm/freebuff-models.js.map +1 -1
- package/dist/llm/freebuff.js +2 -1
- package/dist/llm/freebuff.js.map +1 -1
- package/dist/llm/generation-metrics.d.ts +11 -0
- package/dist/llm/generation-metrics.js +54 -0
- package/dist/llm/generation-metrics.js.map +1 -0
- package/dist/llm/generation-submission.d.ts +2 -0
- package/dist/llm/generation-submission.js +13 -0
- package/dist/llm/generation-submission.js.map +1 -0
- package/dist/llm/glm.js +6 -11
- package/dist/llm/glm.js.map +1 -1
- package/dist/llm/hetzner.js +9 -11
- package/dist/llm/hetzner.js.map +1 -1
- package/dist/llm/hinoki-models.d.ts +3 -0
- package/dist/llm/hinoki-models.js +52 -0
- package/dist/llm/hinoki-models.js.map +1 -0
- package/dist/llm/hinoki-profile.d.ts +4 -0
- package/dist/llm/hinoki-profile.js +58 -0
- package/dist/llm/hinoki-profile.js.map +1 -0
- package/dist/llm/hinoki.d.ts +3 -0
- package/dist/llm/hinoki.js +149 -0
- package/dist/llm/hinoki.js.map +1 -0
- package/dist/llm/kimi.js +6 -11
- package/dist/llm/kimi.js.map +1 -1
- package/dist/llm/kiro.js +11 -10
- package/dist/llm/kiro.js.map +1 -1
- package/dist/llm/lightning.js +6 -10
- package/dist/llm/lightning.js.map +1 -1
- package/dist/llm/merge-gateway.js +9 -10
- package/dist/llm/merge-gateway.js.map +1 -1
- package/dist/llm/meta.js +6 -10
- package/dist/llm/meta.js.map +1 -1
- package/dist/llm/mimo.js +6 -11
- package/dist/llm/mimo.js.map +1 -1
- package/dist/llm/minimax.js +6 -11
- package/dist/llm/minimax.js.map +1 -1
- package/dist/llm/mistral.js +10 -5
- package/dist/llm/mistral.js.map +1 -1
- package/dist/llm/modal.js +6 -11
- package/dist/llm/modal.js.map +1 -1
- package/dist/llm/model-discovery.d.ts +4 -1
- package/dist/llm/model-discovery.js +5 -2
- package/dist/llm/model-discovery.js.map +1 -1
- package/dist/llm/model-limit-store.d.ts +2 -0
- package/dist/llm/model-limit-store.js +44 -12
- package/dist/llm/model-limit-store.js.map +1 -1
- package/dist/llm/model-list-cache.d.ts +15 -0
- package/dist/llm/model-list-cache.js +55 -0
- package/dist/llm/model-list-cache.js.map +1 -0
- package/dist/llm/nvidia.js +9 -10
- package/dist/llm/nvidia.js.map +1 -1
- package/dist/llm/ollama.js +4 -0
- package/dist/llm/ollama.js.map +1 -1
- package/dist/llm/omnirush.js +10 -14
- package/dist/llm/omnirush.js.map +1 -1
- package/dist/llm/openrouter.js +6 -11
- package/dist/llm/openrouter.js.map +1 -1
- package/dist/llm/operation-usage.js +22 -5
- package/dist/llm/operation-usage.js.map +1 -1
- package/dist/llm/orcarouter.js +9 -13
- package/dist/llm/orcarouter.js.map +1 -1
- package/dist/llm/provider-identity.js +5 -0
- package/dist/llm/provider-identity.js.map +1 -1
- package/dist/llm/provider-info-text.js +24 -1
- package/dist/llm/provider-info-text.js.map +1 -1
- package/dist/llm/provider-model-layers.js +7 -0
- package/dist/llm/provider-model-layers.js.map +1 -1
- package/dist/llm/provider-profile-layers.js +5 -1
- package/dist/llm/provider-profile-layers.js.map +1 -1
- package/dist/llm/provider-profiles.d.ts +1 -0
- package/dist/llm/provider-profiles.js +5 -1
- package/dist/llm/provider-profiles.js.map +1 -1
- package/dist/llm/qoder/qoder.js +6 -10
- package/dist/llm/qoder/qoder.js.map +1 -1
- package/dist/llm/qwen-cloud.js +6 -9
- package/dist/llm/qwen-cloud.js.map +1 -1
- package/dist/llm/reasoning-capability.js +1 -0
- package/dist/llm/reasoning-capability.js.map +1 -1
- package/dist/llm/request-plan.js +4 -2
- package/dist/llm/request-plan.js.map +1 -1
- package/dist/llm/river-models.d.ts +1 -0
- package/dist/llm/river-models.js +3 -0
- package/dist/llm/river-models.js.map +1 -1
- package/dist/llm/routing/provider-selection.js +3 -0
- package/dist/llm/routing/provider-selection.js.map +1 -1
- package/dist/llm/routing/request-option-fallback.d.ts +6 -0
- package/dist/llm/routing/request-option-fallback.js +63 -3
- package/dist/llm/routing/request-option-fallback.js.map +1 -1
- package/dist/llm/token-usage.js +7 -2
- package/dist/llm/token-usage.js.map +1 -1
- package/dist/llm/tokenharbor.js +10 -13
- package/dist/llm/tokenharbor.js.map +1 -1
- package/dist/llm/tokenrouter.js +10 -14
- package/dist/llm/tokenrouter.js.map +1 -1
- package/dist/llm/vercel.js +12 -12
- package/dist/llm/vercel.js.map +1 -1
- package/dist/llm/wire/chat-body.js +9 -5
- package/dist/llm/wire/chat-body.js.map +1 -1
- package/dist/llm/wire/openai-stream.js +2 -1
- package/dist/llm/wire/openai-stream.js.map +1 -1
- package/dist/llm/zen-catalog.d.ts +3 -1
- package/dist/llm/zen-catalog.js +9 -3
- package/dist/llm/zen-catalog.js.map +1 -1
- package/dist/mcp/argument-hint.d.ts +9 -0
- package/dist/mcp/argument-hint.js +17 -0
- package/dist/mcp/argument-hint.js.map +1 -0
- package/dist/mcp/catalog.js +5 -5
- package/dist/mcp/catalog.js.map +1 -1
- package/dist/mcp/manager.d.ts +2 -0
- package/dist/mcp/manager.js +21 -1
- package/dist/mcp/manager.js.map +1 -1
- package/dist/mcp/runtime.d.ts +5 -1
- package/dist/mcp/runtime.js +33 -2
- package/dist/mcp/runtime.js.map +1 -1
- package/dist/noninteractive/stream-renderer.js +3 -0
- package/dist/noninteractive/stream-renderer.js.map +1 -1
- package/dist/os/runtime-error.d.ts +2 -0
- package/dist/os/runtime-error.js +39 -0
- package/dist/os/runtime-error.js.map +1 -0
- package/dist/prompts/embedded.js +1 -1
- package/dist/prompts/embedded.js.map +1 -1
- package/dist/prompts/index.js +21 -18
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/system.agent.md +10 -9
- package/dist/rea/availability.d.ts +22 -0
- package/dist/rea/availability.js +82 -0
- package/dist/rea/availability.js.map +1 -0
- package/dist/rea/connection.d.ts +8 -0
- package/dist/rea/connection.js +12 -0
- package/dist/rea/connection.js.map +1 -0
- package/dist/rea/distribution.d.ts +13 -0
- package/dist/rea/distribution.js +140 -0
- package/dist/rea/distribution.js.map +1 -0
- package/dist/rea/download.d.ts +22 -0
- package/dist/rea/download.js +198 -0
- package/dist/rea/download.js.map +1 -0
- package/dist/rea/engine-report.d.ts +4 -0
- package/dist/rea/engine-report.js +77 -0
- package/dist/rea/engine-report.js.map +1 -0
- package/dist/rea/engine-status.d.ts +24 -0
- package/dist/rea/engine-status.js +103 -0
- package/dist/rea/engine-status.js.map +1 -0
- package/dist/rea/engines.d.ts +43 -0
- package/dist/rea/engines.js +160 -0
- package/dist/rea/engines.js.map +1 -0
- package/dist/rea/ghidra.d.ts +83 -0
- package/dist/rea/ghidra.js +316 -0
- package/dist/rea/ghidra.js.map +1 -0
- package/dist/rea/guide.d.ts +14 -0
- package/dist/rea/guide.js +178 -0
- package/dist/rea/guide.js.map +1 -0
- package/dist/rea/hints.d.ts +3 -0
- package/dist/rea/hints.js +99 -0
- package/dist/rea/hints.js.map +1 -0
- package/dist/rea/install.d.ts +10 -0
- package/dist/rea/install.js +173 -0
- package/dist/rea/install.js.map +1 -0
- package/dist/rea/jdk.d.ts +50 -0
- package/dist/rea/jdk.js +171 -0
- package/dist/rea/jdk.js.map +1 -0
- package/dist/rea/node.d.ts +22 -0
- package/dist/rea/node.js +150 -0
- package/dist/rea/node.js.map +1 -0
- package/dist/rea/runtime.d.ts +11 -0
- package/dist/rea/runtime.js +186 -0
- package/dist/rea/runtime.js.map +1 -0
- package/dist/rea/tool-index.d.ts +7 -0
- package/dist/rea/tool-index.js +105 -0
- package/dist/rea/tool-index.js.map +1 -0
- package/dist/rea/types.d.ts +36 -0
- package/dist/rea/types.js +2 -0
- package/dist/rea/types.js.map +1 -0
- package/dist/rea/workflow.d.ts +14 -0
- package/dist/rea/workflow.js +60 -0
- package/dist/rea/workflow.js.map +1 -0
- package/dist/rea/zip.d.ts +19 -0
- package/dist/rea/zip.js +257 -0
- package/dist/rea/zip.js.map +1 -0
- package/dist/safety/tool-classification.js +6 -0
- package/dist/safety/tool-classification.js.map +1 -1
- package/dist/skills/bundled-catalog.generated.d.ts +2 -0
- package/dist/skills/bundled-catalog.generated.js +25 -0
- package/dist/skills/bundled-catalog.generated.js.map +1 -0
- package/dist/skills/bundled-content.generated.d.ts +1 -0
- package/dist/skills/bundled-content.generated.js +20 -0
- package/dist/skills/bundled-content.generated.js.map +1 -0
- package/dist/skills/bundled.d.ts +4 -0
- package/dist/skills/bundled.js +111 -0
- package/dist/skills/bundled.js.map +1 -0
- package/dist/skills/catalog.js +7 -4
- package/dist/skills/catalog.js.map +1 -1
- package/dist/skills/discover.js +1 -0
- package/dist/skills/discover.js.map +1 -1
- package/dist/skills/registry.js +24 -16
- package/dist/skills/registry.js.map +1 -1
- package/dist/skills/types.d.ts +9 -1
- package/dist/skills/types.js.map +1 -1
- package/dist/store/config/endpoints.js +1 -0
- package/dist/store/config/endpoints.js.map +1 -1
- package/dist/store/config.js +2 -0
- package/dist/store/config.js.map +1 -1
- package/dist/store/history/jsonl-backend.d.ts +0 -1
- package/dist/store/history/jsonl-backend.js +3 -136
- package/dist/store/history/jsonl-backend.js.map +1 -1
- package/dist/store/history/legacy-migration.d.ts +6 -0
- package/dist/store/history/legacy-migration.js +127 -0
- package/dist/store/history/legacy-migration.js.map +1 -0
- package/dist/store/history/lifecycle.js +11 -2
- package/dist/store/history/lifecycle.js.map +1 -1
- package/dist/store/history/recovery.js +6 -1
- package/dist/store/history/recovery.js.map +1 -1
- package/dist/store/history/session-frames.d.ts +74 -0
- package/dist/store/history/session-frames.js +234 -0
- package/dist/store/history/session-frames.js.map +1 -0
- package/dist/store/history/session-index.d.ts +13 -0
- package/dist/store/history/session-index.js +135 -0
- package/dist/store/history/session-index.js.map +1 -0
- package/dist/store/history/session-log.d.ts +44 -0
- package/dist/store/history/session-log.js +386 -0
- package/dist/store/history/session-log.js.map +1 -0
- package/dist/store/history/session-paths.d.ts +11 -0
- package/dist/store/history/session-paths.js +35 -0
- package/dist/store/history/session-paths.js.map +1 -0
- package/dist/store/history/session-queries.js +34 -16
- package/dist/store/history/session-queries.js.map +1 -1
- package/dist/store/history/session-store.d.ts +11 -0
- package/dist/store/history/session-store.js +202 -0
- package/dist/store/history/session-store.js.map +1 -0
- package/dist/store/history-index.d.ts +0 -2
- package/dist/store/history-index.js +0 -16
- package/dist/store/history-index.js.map +1 -1
- package/dist/store/history.d.ts +2 -0
- package/dist/store/history.js +76 -56
- package/dist/store/history.js.map +1 -1
- package/dist/store/session-queue.d.ts +4 -0
- package/dist/store/session-queue.js +62 -0
- package/dist/store/session-queue.js.map +1 -0
- package/dist/store/session-workspace-activity.d.ts +4 -0
- package/dist/store/session-workspace-activity.js +69 -0
- package/dist/store/session-workspace-activity.js.map +1 -0
- package/dist/store/session-workspace-cleanup.d.ts +4 -0
- package/dist/store/session-workspace-cleanup.js +246 -0
- package/dist/store/session-workspace-cleanup.js.map +1 -0
- package/dist/store/session-workspace.js +6 -0
- package/dist/store/session-workspace.js.map +1 -1
- package/dist/tools/definitions/aggregate.js +9 -1
- package/dist/tools/definitions/aggregate.js.map +1 -1
- package/dist/tools/definitions/files.js +4 -4
- package/dist/tools/definitions/files.js.map +1 -1
- package/dist/tools/definitions/fs-read.js +2 -2
- package/dist/tools/definitions/fs-read.js.map +1 -1
- package/dist/tools/definitions/shell.js +2 -2
- package/dist/tools/definitions/shell.js.map +1 -1
- package/dist/tools/definitions.js +2 -1
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/fs/mutations.js +1 -1
- package/dist/tools/fs/mutations.js.map +1 -1
- package/dist/tools/fs/read-input.js +33 -20
- package/dist/tools/fs/read-input.js.map +1 -1
- package/dist/tools/handlers/files-2.js +1 -1
- package/dist/tools/handlers/files-2.js.map +1 -1
- package/dist/tools/http/agents.d.ts +4 -5
- package/dist/tools/http/agents.js +4 -12
- package/dist/tools/http/agents.js.map +1 -1
- package/dist/tools/http/fetch.js +3 -10
- package/dist/tools/http/fetch.js.map +1 -1
- package/dist/tools/registry.d.ts +1 -0
- package/dist/tools/registry.js +3 -0
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/shell/artifact.d.ts +7 -0
- package/dist/tools/shell/artifact.js +85 -0
- package/dist/tools/shell/artifact.js.map +1 -0
- package/dist/tools/shell/capture.d.ts +1 -5
- package/dist/tools/shell/capture.js +1 -18
- package/dist/tools/shell/capture.js.map +1 -1
- package/dist/tools/shell/exec-attempt.js +9 -27
- package/dist/tools/shell/exec-attempt.js.map +1 -1
- package/dist/tools/shell/spawn-argv.js +7 -21
- package/dist/tools/shell/spawn-argv.js.map +1 -1
- package/dist/tools/skills.js +11 -1
- package/dist/tools/skills.js.map +1 -1
- package/dist/tui-v2/app/App.js +5 -9
- package/dist/tui-v2/app/App.js.map +1 -1
- package/dist/tui-v2/app/layout-widths.js +3 -2
- package/dist/tui-v2/app/layout-widths.js.map +1 -1
- package/dist/tui-v2/bootstrap/patch-opentui-selection.d.ts +6 -0
- package/dist/tui-v2/bootstrap/patch-opentui-selection.js +27 -0
- package/dist/tui-v2/bootstrap/patch-opentui-selection.js.map +1 -0
- package/dist/tui-v2/bootstrap/patch-opentui-wheel.d.ts +9 -0
- package/dist/tui-v2/bootstrap/patch-opentui-wheel.js +23 -0
- package/dist/tui-v2/bootstrap/patch-opentui-wheel.js.map +1 -0
- package/dist/tui-v2/bootstrap/runtime-view.js +4 -0
- package/dist/tui-v2/bootstrap/runtime-view.js.map +1 -1
- package/dist/tui-v2/bootstrap/start-tui-v2.js +8 -1
- package/dist/tui-v2/bootstrap/start-tui-v2.js.map +1 -1
- package/dist/tui-v2/components/jobs/jobs-panel.js +1 -9
- package/dist/tui-v2/components/jobs/jobs-panel.js.map +1 -1
- package/dist/tui-v2/components/modal/confirm-modal.js +1 -0
- package/dist/tui-v2/components/modal/confirm-modal.js.map +1 -1
- package/dist/tui-v2/components/pager/pager.js +2 -2
- package/dist/tui-v2/components/pager/pager.js.map +1 -1
- package/dist/tui-v2/components/plan/plan-view.js +24 -4
- package/dist/tui-v2/components/plan/plan-view.js.map +1 -1
- package/dist/tui-v2/components/status/context-limit-chip.js +2 -2
- package/dist/tui-v2/components/status/status-line.js +13 -12
- package/dist/tui-v2/components/status/status-line.js.map +1 -1
- package/dist/tui-v2/components/transcript/compacted-row.js +3 -1
- package/dist/tui-v2/components/transcript/compacted-row.js.map +1 -1
- package/dist/tui-v2/components/transcript/intro-card.js +5 -8
- package/dist/tui-v2/components/transcript/intro-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/linkable-text.d.ts +2 -0
- package/dist/tui-v2/components/transcript/linkable-text.js +22 -2
- package/dist/tui-v2/components/transcript/linkable-text.js.map +1 -1
- package/dist/tui-v2/components/transcript/pending-arguments.d.ts +6 -0
- package/dist/tui-v2/components/transcript/pending-arguments.js +16 -0
- package/dist/tui-v2/components/transcript/pending-arguments.js.map +1 -0
- package/dist/tui-v2/components/transcript/selection-snap.d.ts +43 -0
- package/dist/tui-v2/components/transcript/selection-snap.js +68 -0
- package/dist/tui-v2/components/transcript/selection-snap.js.map +1 -0
- package/dist/tui-v2/components/transcript/thinking-block.d.ts +2 -0
- package/dist/tui-v2/components/transcript/thinking-block.js +37 -19
- package/dist/tui-v2/components/transcript/thinking-block.js.map +1 -1
- package/dist/tui-v2/components/transcript/thinking-presentation.d.ts +0 -2
- package/dist/tui-v2/components/transcript/thinking-presentation.js +0 -52
- package/dist/tui-v2/components/transcript/thinking-presentation.js.map +1 -1
- package/dist/tui-v2/components/transcript/tool-card.js +4 -3
- package/dist/tui-v2/components/transcript/tool-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/transcript-row.js +20 -6
- package/dist/tui-v2/components/transcript/transcript-row.js.map +1 -1
- package/dist/tui-v2/components/transcript/transcript-scroll-port.d.ts +2 -0
- package/dist/tui-v2/components/transcript/transcript-scroll-port.js +37 -0
- package/dist/tui-v2/components/transcript/transcript-scroll-port.js.map +1 -1
- package/dist/tui-v2/components/transcript/transcript-view.js +159 -109
- package/dist/tui-v2/components/transcript/transcript-view.js.map +1 -1
- package/dist/tui-v2/composer/composer-editor.js +2 -4
- package/dist/tui-v2/composer/composer-editor.js.map +1 -1
- package/dist/tui-v2/composer/composer-highlight.js +2 -1
- package/dist/tui-v2/composer/composer-highlight.js.map +1 -1
- package/dist/tui-v2/composer/composer-wheel.d.ts +1 -1
- package/dist/tui-v2/composer/composer-wheel.js +4 -4
- package/dist/tui-v2/composer/composer-wheel.js.map +1 -1
- package/dist/tui-v2/rendering/ansi-to-styled.js +16 -20
- package/dist/tui-v2/rendering/ansi-to-styled.js.map +1 -1
- package/dist/types.d.ts +10 -7
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -1
- package/dist/ui/mentions/expand.js +4 -0
- package/dist/ui/mentions/expand.js.map +1 -1
- package/dist/ui-core/bootstrap/fatal-diagnostics.d.ts +1 -0
- package/dist/ui-core/bootstrap/fatal-diagnostics.js +9 -0
- package/dist/ui-core/bootstrap/fatal-diagnostics.js.map +1 -0
- package/dist/ui-core/bootstrap/lifecycle.d.ts +4 -0
- package/dist/ui-core/bootstrap/lifecycle.js +27 -4
- package/dist/ui-core/bootstrap/lifecycle.js.map +1 -1
- package/dist/ui-core/commands/command-handlers.js +2 -0
- package/dist/ui-core/commands/command-handlers.js.map +1 -1
- package/dist/ui-core/commands/picker-commands.d.ts +6 -2
- package/dist/ui-core/commands/picker-commands.js +31 -17
- package/dist/ui-core/commands/picker-commands.js.map +1 -1
- package/dist/ui-core/commands/rea-commands.d.ts +3 -0
- package/dist/ui-core/commands/rea-commands.js +176 -0
- package/dist/ui-core/commands/rea-commands.js.map +1 -0
- package/dist/ui-core/commands/rea-engines-commands.d.ts +37 -0
- package/dist/ui-core/commands/rea-engines-commands.js +433 -0
- package/dist/ui-core/commands/rea-engines-commands.js.map +1 -0
- package/dist/ui-core/composer/completion.js +3 -0
- package/dist/ui-core/composer/completion.js.map +1 -1
- package/dist/ui-core/controllers/overlay-controller.d.ts +1 -1
- package/dist/ui-core/controllers/selection-controller.d.ts +2 -1
- package/dist/ui-core/controllers/selection-controller.js +27 -0
- package/dist/ui-core/controllers/selection-controller.js.map +1 -1
- package/dist/ui-core/layout/compute-layout.d.ts +2 -2
- package/dist/ui-core/layout/compute-layout.js +3 -3
- package/dist/ui-core/layout/compute-layout.js.map +1 -1
- package/dist/ui-core/motion/wheel-scroll.d.ts +9 -0
- package/dist/ui-core/motion/wheel-scroll.js +36 -0
- package/dist/ui-core/motion/wheel-scroll.js.map +1 -0
- package/dist/ui-core/rendering/compaction-pager-source.d.ts +4 -0
- package/dist/ui-core/rendering/compaction-pager-source.js +65 -0
- package/dist/ui-core/rendering/compaction-pager-source.js.map +1 -0
- package/dist/ui-core/rendering/duration.d.ts +3 -1
- package/dist/ui-core/rendering/duration.js +12 -3
- package/dist/ui-core/rendering/duration.js.map +1 -1
- package/dist/ui-core/rendering/incremental-strip.js +4 -1
- package/dist/ui-core/rendering/incremental-strip.js.map +1 -1
- package/dist/ui-core/rendering/intro-header.d.ts +3 -0
- package/dist/ui-core/rendering/intro-header.js +146 -161
- package/dist/ui-core/rendering/intro-header.js.map +1 -1
- package/dist/ui-core/rendering/job-tail-source.js +30 -2
- package/dist/ui-core/rendering/job-tail-source.js.map +1 -1
- package/dist/ui-core/rendering/markdown/bold-lines.d.ts +1 -0
- package/dist/ui-core/rendering/markdown/bold-lines.js +79 -0
- package/dist/ui-core/rendering/markdown/bold-lines.js.map +1 -0
- package/dist/ui-core/rendering/markdown.d.ts +1 -0
- package/dist/ui-core/rendering/markdown.js +19 -13
- package/dist/ui-core/rendering/markdown.js.map +1 -1
- package/dist/ui-core/rendering/open-tool-output.d.ts +1 -0
- package/dist/ui-core/rendering/open-tool-output.js +8 -0
- package/dist/ui-core/rendering/open-tool-output.js.map +1 -1
- package/dist/ui-core/rendering/pending-arguments.d.ts +2 -0
- package/dist/ui-core/rendering/pending-arguments.js +6 -0
- package/dist/ui-core/rendering/pending-arguments.js.map +1 -0
- package/dist/ui-core/rendering/plan-view.js +0 -4
- package/dist/ui-core/rendering/plan-view.js.map +1 -1
- package/dist/ui-core/rendering/render-markdown-lines.d.ts +1 -0
- package/dist/ui-core/rendering/render-markdown-lines.js +1 -0
- package/dist/ui-core/rendering/render-markdown-lines.js.map +1 -1
- package/dist/ui-core/rendering/streaming-markdown.js +1 -1
- package/dist/ui-core/rendering/streaming-markdown.js.map +1 -1
- package/dist/ui-core/rendering/strip-tool-surfaces.js +7 -7
- package/dist/ui-core/rendering/strip-tool-surfaces.js.map +1 -1
- package/dist/ui-core/rendering/text-width.d.ts +1 -0
- package/dist/ui-core/rendering/text-width.js +22 -2
- package/dist/ui-core/rendering/text-width.js.map +1 -1
- package/dist/ui-core/rendering/thinking-tail.js +6 -2
- package/dist/ui-core/rendering/thinking-tail.js.map +1 -1
- package/dist/ui-core/rendering/tool-output-pager-source.d.ts +4 -0
- package/dist/ui-core/rendering/tool-output-pager-source.js +94 -0
- package/dist/ui-core/rendering/tool-output-pager-source.js.map +1 -0
- package/dist/ui-core/rendering/tool-presenter.js +47 -64
- package/dist/ui-core/rendering/tool-presenter.js.map +1 -1
- package/dist/ui-core/state/hydrate/classic-transcript.js +2 -0
- package/dist/ui-core/state/hydrate/classic-transcript.js.map +1 -1
- package/dist/ui-core/state/semantic-document.d.ts +4 -0
- package/dist/ui-core/state/semantic-document.js.map +1 -1
- package/dist/ui-core/state/transcript/apply-app-event.d.ts +2 -2
- package/dist/ui-core/state/transcript/apply-app-event.js +164 -384
- package/dist/ui-core/state/transcript/apply-app-event.js.map +1 -1
- package/dist/ui-core/state/transcript/tool-lifecycle.d.ts +19 -0
- package/dist/ui-core/state/transcript/tool-lifecycle.js +102 -0
- package/dist/ui-core/state/transcript/tool-lifecycle.js.map +1 -0
- package/dist/ui-core/state/transcript-hydrate.js +3 -0
- package/dist/ui-core/state/transcript-hydrate.js.map +1 -1
- package/dist/ui-core/state/transcript-types.d.ts +3 -0
- package/dist/ui-core/state/transcript-types.js.map +1 -1
- package/dist/ui-core/state/transcript-window.d.ts +9 -0
- package/dist/ui-core/state/transcript-window.js +9 -0
- package/dist/ui-core/state/transcript-window.js.map +1 -1
- package/dist/version.generated.d.ts +2 -2
- package/dist/version.generated.js +2 -2
- package/dist/version.generated.js.map +1 -1
- package/guides/security-skill.md +59 -0
- package/package.json +11 -3
- package/resources/skills/clai-superman-skill/SKILL.md +73 -0
- package/resources/skills/clai-superman-skill/references/ai-agents.md +51 -0
- package/resources/skills/clai-superman-skill/references/cloud-platform.md +48 -0
- package/resources/skills/clai-superman-skill/references/code-supply-chain.md +61 -0
- package/resources/skills/clai-superman-skill/references/crypto-contracts.md +46 -0
- package/resources/skills/clai-superman-skill/references/evidence-reporting.md +86 -0
- package/resources/skills/clai-superman-skill/references/identity-ad.md +51 -0
- package/resources/skills/clai-superman-skill/references/mobile-client.md +52 -0
- package/resources/skills/clai-superman-skill/references/novel-research.md +97 -0
- package/resources/skills/clai-superman-skill/references/operations.md +109 -0
- package/resources/skills/clai-superman-skill/references/security-operations.md +55 -0
- package/resources/skills/clai-superman-skill/references/sources.md +51 -0
- package/resources/skills/clai-superman-skill/references/systems-protocols.md +52 -0
- package/resources/skills/clai-superman-skill/references/web-api.md +65 -0
- package/resources/skills/clai-superman-skill/references/wireless-iot-ot.md +49 -0
- package/test/fixtures/security-skill-scenarios.json +191 -0
- package/dist/agent/context/compaction-work-history.d.ts +0 -13
- package/dist/agent/context/compaction-work-history.js +0 -150
- package/dist/agent/context/compaction-work-history.js.map +0 -1
- package/dist/tui-v2/components/transcript/transcript-scrollbar.d.ts +0 -29
- package/dist/tui-v2/components/transcript/transcript-scrollbar.js +0 -211
- package/dist/tui-v2/components/transcript/transcript-scrollbar.js.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Source audits, changes and supply-chain trust
|
|
2
|
+
|
|
3
|
+
Use for security code review, repository audits, dependencies, CI/CD and release pipelines. A code audit is not an invitation to edit, install or execute the repository; preserve the user's requested mode. Treat untrusted repositories and build hooks as attacker-controlled input.
|
|
4
|
+
|
|
5
|
+
## Build a causal model before searching
|
|
6
|
+
|
|
7
|
+
Identify entrypoints, privilege domains, data models, authoritative state, trust boundaries and sensitive sinks. Follow one representative normal operation end-to-end. Record version/commit, relevant configuration and deployment assumptions. Tests and comments express intent; actual call sites and runtime behavior determine the contract.
|
|
8
|
+
|
|
9
|
+
Search to navigate; read the code that proves a claim. Trace attacker control through parsing, normalization, validation, policy, serialization, persistence, workers and the final interpreter. Include indirect calls, registries, generated routes, plugins, FFI and conditional compilation when applicable. An unchecked value becomes a vulnerability only if it reaches a security-relevant operation under the attacker model.
|
|
10
|
+
|
|
11
|
+
## Audit from both directions
|
|
12
|
+
|
|
13
|
+
- From exposed inputs, ask what authority they can influence and where checks can be skipped.
|
|
14
|
+
- From privileged sinks, ask every caller, transformation and assumed precondition.
|
|
15
|
+
- From invariants, ask which operations can create a forbidden state and which failure/retry paths escape enforcement.
|
|
16
|
+
- From identity transitions, ask where authority is cached, copied, delegated, revoked or reconstructed.
|
|
17
|
+
|
|
18
|
+
Reconcile forward and backward paths. A source pattern with no reachable sink and a dangerous sink with only trusted input need different dispositions from an end-to-end vulnerability.
|
|
19
|
+
|
|
20
|
+
## Language/runtime families
|
|
21
|
+
|
|
22
|
+
| Surface | Useful hypotheses |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| JS/TS | Prototype mutation and reachable gadgets, coercion/null/undefined, own versus inherited properties, path/URL resolution, DOM/IPC sinks, async state races, dynamic import/eval and unsafe deserialization |
|
|
25
|
+
| Python/Ruby/PHP | Template/evaluation/deserialization reachability, shell/argument boundaries, dynamic dispatch, path handling and framework authorization/order |
|
|
26
|
+
| JVM/.NET | Deserialization/XXE where enabled, expression/template sinks, reflection, unsafe type resolution, security context propagation and framework configuration |
|
|
27
|
+
| Go/Rust | Parser/state/concurrency mistakes, path and numeric conversions, unsafe/FFI, ownership assumptions, cancellation/deadline behavior, resource/authorization logic |
|
|
28
|
+
| C/C++ | Bounds/arithmetic/lifetime, type confusion, concurrency, parser state, format strings and system-call privilege boundaries |
|
|
29
|
+
| SQL/config/IaC | Row/tenant policy, parameter binding, trigger/procedure authority, policy evaluation, defaults/fallbacks, secret references and drift |
|
|
30
|
+
|
|
31
|
+
These are search directions, not findings or an exhaustive language inventory. Research unfamiliar runtime semantics and exact dependency versions. Safe languages still permit logic and trust-boundary vulnerabilities.
|
|
32
|
+
|
|
33
|
+
## Differential review
|
|
34
|
+
|
|
35
|
+
For a change, establish the old invariant, the new behavior and affected callers. Inspect removed/relocated validation, changes in defaults, privilege/identity propagation, error handling and parsing order. Read nearby history or security patches when they explain a non-obvious constraint. Line count is not risk: a small key-selection or authorization change can cross a large boundary.
|
|
36
|
+
|
|
37
|
+
Assess transitive impact through callers, shared helpers, API/schema compatibility, generated consumers and background jobs. A refactor can change enforcement order without changing the nominal API. Test the original supported path and an alternate/error path; don't label missing tests themselves an exploitable vulnerability or inflate severity for absence of coverage alone.
|
|
38
|
+
|
|
39
|
+
## Static analysis that earns its cost
|
|
40
|
+
|
|
41
|
+
Use CodeQL, Semgrep or other analyzers when a modeled family benefits from scale. Configure languages, build modes, generated/excluded files and dataflow assumptions deliberately. Preserve machine-readable results and actual coverage limitations.
|
|
42
|
+
|
|
43
|
+
For a custom rule, start with a real seed and positive/negative fixtures; confirm the known instance hits. Broaden the root-cause pattern along meaningful axes and triage all candidate classes. Tune against false positives without excluding a plausible variant merely for convenience. A SARIF record or taint path is a hypothesis until reachability, guards and impact are checked.
|
|
44
|
+
|
|
45
|
+
Use [novel research](novel-research.md) for properties, differential testing and variants. Do not claim the entire repository audited when only changed files or reachable service paths were examined.
|
|
46
|
+
|
|
47
|
+
## Dependencies and build/release chains
|
|
48
|
+
|
|
49
|
+
Trace untrusted contribution/package/artifact -> execution context -> credentials/signing authority -> published artifact. Examine lockfiles and resolved transitive versions, optional/platform dependencies, postinstall/build scripts, private/public namespace resolution, registries, vendoring, generated code and update channels.
|
|
50
|
+
|
|
51
|
+
Version-match advisories to the installed artifact and configuration; check vendor backports and reachable feature paths. Distinguish vulnerable dependency presence, reachable vulnerable functionality and demonstrated exploit impact. Package popularity, staleness and concentration are risk signals, not proof of compromise.
|
|
52
|
+
|
|
53
|
+
For CI, inspect events, permissions, untrusted contexts expanded into scripts, privileged checkout, reusable workflows, runner reuse, artifact/cache trust, environment approvals and OIDC subject/audience conditions. A workflow triggered by an untrusted PR may have different privilege than one triggered in the base repository. Never execute an adversarial PR on a runner holding production secrets to validate a suspicion.
|
|
54
|
+
|
|
55
|
+
For releases, check source/artifact binding, signer/key access, immutable action/dependency references, provenance, promotion, rollback and verification at installation. Signing a compromised artifact doesn't make its source trustworthy. A tag pin and a full immutable commit pin have different guarantees.
|
|
56
|
+
|
|
57
|
+
## Proof and remediation
|
|
58
|
+
|
|
59
|
+
Write a minimal regression case that exercises the actual caller and violated invariant. Show attacker control, path, guard failure and consequence. If permitted to fix, change the root cause, preserve legitimate behavior and test siblings and negative cases. If the task is review only, deliver the evidence and fix recommendation without mutating the project.
|
|
60
|
+
|
|
61
|
+
Report exact files/lines/commit and configuration, not unsupported deployment claims. A code-level defect can be confirmed while remote exploitability remains untested. Keep that distinction in severity and reproduction, and state the repository/deployment areas not assessed.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Cryptographic boundaries and smart contracts
|
|
2
|
+
|
|
3
|
+
Use when cryptographic construction, key management, protocol proofs or on-chain state is central. Do not infer algorithm weakness from unfamiliarity, and do not invent a cryptographic proof. Consult primary specifications, audited library contracts and chain/runtime semantics.
|
|
4
|
+
|
|
5
|
+
## Cryptographic investigation
|
|
6
|
+
|
|
7
|
+
Identify the exact security property: authenticity, confidentiality, freshness, peer identity, key separation or non-repudiation. Record attacker knowledge/control, chosen-message/ciphertext/oracle access, key custody, randomness sources and the component performing verification.
|
|
8
|
+
|
|
9
|
+
Trace construction and composition, not just primitive names. Investigate nonce reuse, entropy, domain separation, key derivation/context, serialization ambiguity, signature canonicalization, key/algorithm selection, error/timing oracles, state rollback and downgrade/fallback paths when the implementation supports them.
|
|
10
|
+
|
|
11
|
+
Useful discriminating questions:
|
|
12
|
+
|
|
13
|
+
- Is the verified byte string exactly the one later interpreted, including canonicalization and optional fields?
|
|
14
|
+
- Can one protocol/tenant/purpose accept a token/signature from another context?
|
|
15
|
+
- Are nonce/counter uniqueness and replay state preserved across crashes, replicas and restore?
|
|
16
|
+
- Does failure leave unauthenticated plaintext or partially trusted state usable downstream?
|
|
17
|
+
- Is a local authentication UI actually bound to cryptographic key use and the sensitive operation?
|
|
18
|
+
- Can an attacker choose a key/issuer/algorithm or influence the verifier's lookup without possessing signing authority?
|
|
19
|
+
|
|
20
|
+
Demonstrate the violated property with synthetic keys and controlled data where possible. An obsolete primitive's presence, a timing fluctuation or a decoded token isn't automatically an exploit. Prove oracle observability and control; use statistical reasoning appropriate to the measurement and don't run load-heavy side-channel experiments on production by default.
|
|
21
|
+
|
|
22
|
+
## Smart-contract system model
|
|
23
|
+
|
|
24
|
+
Record chain/network, block/fork context, deployed code/address, proxy/implementation/admin, compiler settings, dependencies, roles, upgradeability and external protocol assumptions. Verified source may differ from the actual implementation at the tested block; reconcile it.
|
|
25
|
+
|
|
26
|
+
Map assets and state invariants: conservation of balances/shares, authorization to mint/burn/upgrade, solvency, settlement order, withdrawal entitlement and trusted price/message sources. Include token behavior, callbacks, fee/rebasing assets, bridges, off-chain signers, sequencers and admin powers when present.
|
|
27
|
+
|
|
28
|
+
| Observed mechanism | Hypotheses and useful proof |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| External calls/callbacks | Reentrancy/cross-function state assumptions; a controlled callback breaks a balance/authorization invariant |
|
|
31
|
+
| Vault/share/accounting | Rounding, precision/unit mismatch, donation/first-depositor effects; a minimized state sequence yields unauthorized value or insolvency |
|
|
32
|
+
| Oracle/liquidity dependency | Stale/manipulable price, wrong units/window, trust/circuit-breaker assumptions; realistic controlled state and economic feasibility |
|
|
33
|
+
| Signature-based operations | Domain/chain/contract/nonce binding, replay, malleability, signer role; accepted unintended action using synthetic test signatures |
|
|
34
|
+
| Bridge/cross-chain messages | Source identity/finality/proof, replay, receiver context; distinguish local validation failure from assumed external compromise |
|
|
35
|
+
| Upgrades/initialization | Uninitialized proxy/implementation, storage collision, role/admin confusion; lower-privilege actor demonstrably changes controlled authority |
|
|
36
|
+
| Transaction ordering | Front-running/sandwich/MEV and time assumptions; executable sequence with stated capital, fees and market preconditions |
|
|
37
|
+
|
|
38
|
+
Use forked/local test environments and controlled assets for active proofs. Never move other users' funds, manipulate a live market or exercise a production governance change merely to prove an issue. Clearly distinguish a test-harness capability such as arbitrary storage modification from capabilities an external attacker has.
|
|
39
|
+
|
|
40
|
+
## Properties, feasibility and closure
|
|
41
|
+
|
|
42
|
+
Use stateful property tests and differential accounting models for sequences ordinary unit tests miss. Preserve the seed, initial state, transaction ordering and exact failing invariant. Minimize failing sequences and remove artificial harness privileges.
|
|
43
|
+
|
|
44
|
+
A profitable-looking trace may depend on impossible liquidity, an unavailable role, invalid token behavior or omitted fees. Challenge those assumptions before claiming theft. A design-centralized admin capability can be a trust assumption rather than an unintended exploit; state the promised boundary.
|
|
45
|
+
|
|
46
|
+
Report concrete violated properties, affected versions/deployments, preconditions, reproduction, impact and remediation. State unverified external protocol, hardware side-channel, economic and chain-finality assumptions instead of claiming universal security.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Evidence, false-positive challenge and closure
|
|
2
|
+
|
|
3
|
+
Use when a lead becomes a finding, an exploit chain is claimed, or the engagement is approaching closure. Scale the artifact to the task. A narrow answer may belong in chat; create a report file when requested or when the engagement deliverable calls for it, not as an automatic side effect of a question.
|
|
4
|
+
|
|
5
|
+
## Evidence ladder
|
|
6
|
+
|
|
7
|
+
Keep these levels separate:
|
|
8
|
+
|
|
9
|
+
1. **Signal:** banner, scanner alert, reflection, crash, unusual response, graph edge or suspicious source pattern.
|
|
10
|
+
2. **Mechanism:** the input/state reaches the responsible component and the suspected validation/authorization/state assumption fails.
|
|
11
|
+
3. **Security consequence:** an attacker under the stated capabilities crosses a protected boundary or violates a security property.
|
|
12
|
+
4. **Bounded impact:** the effect is independently observed and contextualized; potential broader harm is explicitly inferred or untested.
|
|
13
|
+
5. **Reproducibility:** another operator can reproduce the claim under documented conditions without guessing missing prerequisites.
|
|
14
|
+
|
|
15
|
+
A source-level finding can establish a real defect while remote deployment remains unverified. An interrupted exploit can establish a partial chain. Report those accurately instead of promoting them to demonstrated compromise or discarding useful evidence entirely.
|
|
16
|
+
|
|
17
|
+
## Capture only what proves the claim
|
|
18
|
+
|
|
19
|
+
For HTTP preserve method/URL, relevant headers, body, status, redirect chain, cookies/auth context by secure reference, raw response and actual state/callback evidence. Avoid browser-readable extraction when comments, scripts or exact headers matter. Record disabled TLS verification and how routing/virtual-host/SNI was established.
|
|
20
|
+
|
|
21
|
+
For native/mobile/runtime work preserve artifact hash/build, platform, input/state, principal/process context, minimal trace/stack and observed effect. For cloud/AD preserve actual identity/session and effective policy context. For stochastic AI tests record relevant history/configuration, retrieved artifacts, exact tool calls and successes/trials.
|
|
22
|
+
|
|
23
|
+
Record timestamp/timezone, environment/version, tool options, capture truncation, relevant sampling and artifact path/hash. Screenshots illustrate; raw transactions, inputs, state and traces make reproduction possible. Never fabricate missing output, exit status, privilege, callbacks or data.
|
|
24
|
+
|
|
25
|
+
Use secure storage and redacted report excerpts. Do not put secrets in command arguments, public reports, reusable instructions or model context. A unique canary or metadata proof is usually preferable to real sensitive data. Respect retention and do not upload client artifacts to public sandboxes without permission.
|
|
26
|
+
|
|
27
|
+
## False-positive challenge
|
|
28
|
+
|
|
29
|
+
Before confirming, answer the questions relevant to this mechanism:
|
|
30
|
+
|
|
31
|
+
- Is this the intended target/service/build, not a proxy, challenge, error template or stale local replica?
|
|
32
|
+
- Does the attacker actually control the triggering input/state and reach the path under the reported privilege?
|
|
33
|
+
- Is the claimed boundary supposed to hold, or is this an intentionally granted feature/admin power?
|
|
34
|
+
- Did the valid baseline work and the negative control behave differently?
|
|
35
|
+
- Could caching, shared state, redirects, reflection, test instrumentation or preexisting data explain the signal?
|
|
36
|
+
- Was the security effect independently observed, not just claimed by the tool/model or inferred from a response code?
|
|
37
|
+
- Do sanitization, a dominating check, a transaction, permissions, mitigation or unreachable feature defeat the path?
|
|
38
|
+
- Can a fresh controlled state reproduce the effect? If nondeterministic, are the observed conditions and trial counts stated?
|
|
39
|
+
- Does the conclusion depend on an unproved chain edge, unrealistic capability, unavailable role or destructive assumption?
|
|
40
|
+
|
|
41
|
+
Seek the strongest counterexample, not just confirming variations. Refute the narrow mechanism when contradicted; don't relabel every failed attempt as evidence the system is secure.
|
|
42
|
+
|
|
43
|
+
## Minimal safe PoC
|
|
44
|
+
|
|
45
|
+
A PoC should include setup, controlled identities/objects, exact input/sequence, expected legitimate behavior, observed unauthorized behavior and cleanup. It should do only enough to demonstrate the property. Prefer one owned record, one harmless execution marker, one canary file or a read-only identity/capability check to dumping data or modifying production controls.
|
|
46
|
+
|
|
47
|
+
Include negative and legitimate controls and describe external callbacks or test infrastructure. Prevent retries from multiplying state changes. Document rate/concurrency and stop conditions for stateful tests. If execution would exceed scope or allowed impact, supply the established evidence and label the remaining consequence untested rather than executing it anyway.
|
|
48
|
+
|
|
49
|
+
For chains, document each edge's input capability, preconditions, action, result and proof. Show that adjacent edges are compatible. Clearly mark where a chain stops; a plausible endpoint is not a demonstrated endpoint.
|
|
50
|
+
|
|
51
|
+
## Severity and classification
|
|
52
|
+
|
|
53
|
+
Explain likelihood/preconditions and business/technical impact separately. Distinguish exposure, weakness, exploitability and risk. Use the engagement's requested scoring standard; if none is specified and a score is useful, use the current applicable CVSS guidance and a verified calculator rather than guessing a number.
|
|
54
|
+
|
|
55
|
+
When publishing CVSS, provide version, nomenclature/metric groups, score, vector and rationale for non-obvious metrics. CVSS is owned by FIRST and used by permission. A Base score communicates intrinsic severity, not the organization's complete risk; incorporate environment and threat context separately. Do not transfer a vendor score unchanged when the demonstrated conditions differ.
|
|
56
|
+
|
|
57
|
+
Use specific CWE and framework identifiers only after checking their definitions and fit. ATT&CK/ATLAS describes behavior; OWASP lists/control standards guide relevant tests; neither proves exploitability. Novel behavior may need a narrative instead of a forced identifier.
|
|
58
|
+
|
|
59
|
+
Group manifestations by root cause and remediation while preserving materially different impacts. Don't inflate severity or finding count because several tools reported the same issue. Hardening opportunities and architectural trust assumptions should not be disguised as confirmed exploit findings.
|
|
60
|
+
|
|
61
|
+
## Report contract
|
|
62
|
+
|
|
63
|
+
For each confirmed finding provide:
|
|
64
|
+
|
|
65
|
+
- Title, affected asset/interface/build and status/confidence.
|
|
66
|
+
- Attacker prerequisites and violated security boundary.
|
|
67
|
+
- Reproduction with minimal inputs and expected versus actual behavior.
|
|
68
|
+
- Evidence references and relevant redacted excerpts.
|
|
69
|
+
- Demonstrated impact, clearly separated inferred consequences and limits.
|
|
70
|
+
- Severity rationale and verified classification if used.
|
|
71
|
+
- Root cause, concrete remediation and verification criteria.
|
|
72
|
+
- Related variants/chains, cleanup and retest status.
|
|
73
|
+
|
|
74
|
+
At engagement level provide objective/scope, assessment period/vantages, tested identities and material surfaces, sampling rationale, findings, control observations, limitations, unresolved leads and next actions. A truthful negative assessment says “no issue demonstrated within these tests,” not “no vulnerabilities exist.”
|
|
75
|
+
|
|
76
|
+
## Cleanup and retest
|
|
77
|
+
|
|
78
|
+
Reconcile all test-created accounts/files/objects, listeners/processes, credentials/certificates, ACL/config changes, test AP/device state and external infrastructure. Remove/revoke only engagement-owned state according to the agreed procedure; preserve audit trails and evidence. Record what was actually cleaned and what an owner must still do.
|
|
79
|
+
|
|
80
|
+
Retest the original case on the remediated build with comparable identity, state and vantage. Test a legitimate baseline plus relevant sibling/alternate path. Distinguish **fixed**, **partially fixed**, **still reproducible**, **not reproducible under current conditions**, and **blocked/untested**. Failure to reproduce without the original prerequisites does not prove a patch.
|
|
81
|
+
|
|
82
|
+
## Final reconciliation
|
|
83
|
+
|
|
84
|
+
Compare scope and objectives against the ledger: assets, services, identities, tenants, features, states, trust boundaries, versions, observed anomalies and chain edges. Every material unresolved item needs a disposition and reason. Make budget exhaustion, absent credentials/hardware, unavailable services and forbidden impact visible.
|
|
85
|
+
|
|
86
|
+
Declare completion only for the stated assessment boundary and evidence. If stopped early, use an honest status such as `partial`, `blocked` or `paused_budget`, name remaining work and preserve a concrete resumption point. Never hide unfinished testing behind a polished report.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Identity, Active Directory and enterprise trust
|
|
2
|
+
|
|
3
|
+
Use for AD DS, Windows domains, hybrid identity, IdPs and federated SaaS. Separate exposure, effective permissions and demonstrated escalation. Technique prerequisites change with server updates and policy; consult current Microsoft/vendor documentation rather than assuming an old exploit still works.
|
|
4
|
+
|
|
5
|
+
## Build the identity and trust graph
|
|
6
|
+
|
|
7
|
+
Record domains/forests/tenants, principals and groups, nested membership, delegation, trust directions, management tiers, enrollment authorities, sync/federation paths, service identities and administrative interfaces. Label edges by who controls what, from which host, using which authentication protocol. Include local versus domain privileges and SaaS control versus data-plane permissions.
|
|
8
|
+
|
|
9
|
+
Establish the current principal, logon type, token/group membership, network vantage, authentication method, domain policy and relevant builds. Clock skew, name resolution, SPNs, proxy behavior and SMB/LDAP negotiation can invalidate a test before it touches the target mechanism. Preserve that distinction.
|
|
10
|
+
|
|
11
|
+
An attack-graph edge is a candidate permission relationship, not an executed path. Validate important edges against effective permissions, deny entries, inheritance, object protection, network reachability and current server behavior. Do not assume every diagrammed shortest path is feasible.
|
|
12
|
+
|
|
13
|
+
## High-value families
|
|
14
|
+
|
|
15
|
+
| Observed capability | Hypothesis | Discriminating validation |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| Low-privileged authenticated domain identity | Excessive directory/object ACLs, group ownership, writable GPO or service configuration | Resolve inherited/effective rights and object scope; use a controlled reversible object change only when allowed |
|
|
18
|
+
| Kerberos service accounts/delegation | Weak service credential protection, constrained/unconstrained/resource-based delegation, incorrect SPN/trust binding | Verify exact principal, flags, service reachability and policy; bounded approved ticket/credential handling, not indiscriminate collection |
|
|
19
|
+
| NTLM-capable services | Relay/coercion prerequisites, missing signing/channel binding/EPA | Identify a compatible source/destination and actual enforcement; TLS alone does not prove binding; don't coerce arbitrary users |
|
|
20
|
+
| AD CS enrollment/control | Subject/SAN control, template ACLs, agent/signing/EKU misuse, enrollment endpoint relay | Trace requester -> template/CA permissions -> issuance -> mapping -> accepted identity; certificate issuance alone is not domain takeover |
|
|
21
|
+
| Local foothold | Privileged service/task/autorun paths, weak ACLs, credential exposure, token boundary mistakes | Show a lower-privilege principal can influence a privileged execution or access path; admin inspecting admin secrets is not escalation |
|
|
22
|
+
| Hybrid identity/sync/federation | Sync account rights, app consent, federation key/control, cross-tenant trust | Establish which authority can mint/accept identities and the exact tenant/resource boundary |
|
|
23
|
+
| SaaS support/admin interfaces | Delegated admin, role switching, invitation and recovery bypasses | Test principal/tenant/resource binding and revocation with controlled accounts |
|
|
24
|
+
|
|
25
|
+
## Authentication is a stateful protocol
|
|
26
|
+
|
|
27
|
+
For Kerberos, NTLM, LDAP, SMB, WinRM, RDP and HTTP negotiate the actual protocol and protections. A service banner or policy's intended default is not proof of enforcement. Test downgrade/fallback only within the agreed method; distinguish credential rejection, unavailable service and transport failure.
|
|
28
|
+
|
|
29
|
+
For certificate services evaluate template permissions, enrollment/approval requirements, purpose restrictions, authorized signatures, certificate-to-account mapping, endpoint protection and patch-level behavior together. ESC names are research labels that evolve: verify the specific current prerequisites rather than treating every certificate template as vulnerable.
|
|
30
|
+
|
|
31
|
+
For federation evaluate signature validation, issuer/audience/resource binding, destination/recipient, freshness/replay, key rollover, claim transformation and token exchange. Distinguish identity provider guarantees from the application's authorization. A valid identity token for one audience need not authorize another service.
|
|
32
|
+
|
|
33
|
+
## Credentials: a capability, not a collection objective
|
|
34
|
+
|
|
35
|
+
Use secure credential references; never paste hashes, tickets, passwords, certificates or recovery material into ordinary prompts and logs. Discovering a secret does not authorize using it on unrelated services. Identify owner, scope, lifetime and rotation needs without exposing the value.
|
|
36
|
+
|
|
37
|
+
Establish lockout/MFA/rate limits before any credential testing. Password spraying, ticket requests, coercion, credential dumping, replication, persistence and account changes have operational consequences; do them only when needed for the authorized objective and allowed impact. Prefer a test principal or minimal capability proof over extracting the domain's secrets.
|
|
38
|
+
|
|
39
|
+
A successful low-privilege login establishes only that login. “Domain admin” requires verified effective privilege under that identity; membership-like strings and graph predictions are not enough. If a benign proof satisfies the objective, further collection adds risk without evidence value.
|
|
40
|
+
|
|
41
|
+
## Chain reasoning
|
|
42
|
+
|
|
43
|
+
Example candidate chain: writable group edge -> enrollment right -> certificate issuance -> accepted elevated identity. For each edge record prerequisite, supporting evidence, negative control, impact and cleanup. Validate current protections between edges. Don't report the final privilege if only the first permission was observed.
|
|
44
|
+
|
|
45
|
+
After a confirmed root cause, examine the policy/permission family: equivalent templates, delegated OU trees, nested groups, sibling applications, service accounts and trust relationships. Reconcile identities and management planes left untested instead of declaring the whole directory assessed from a single foothold.
|
|
46
|
+
|
|
47
|
+
## Detection and cleanup
|
|
48
|
+
|
|
49
|
+
For emulation, agree whether the goal is path feasibility, prevention, telemetry generation or alert/response validation. Record principal, host, time, source, technique and expected telemetry; use [security operations](security-operations.md) for the detection pipeline. An alert means neither blocked execution nor successful containment.
|
|
50
|
+
|
|
51
|
+
Track every created account, certificate, group/ACL/policy modification, task, service, process, ticket and test artifact. Revoke or remove only engagement-created state using an agreed cleanup procedure; don't erase audit trails. Retest original and alternate paths after remediation with the same principal and build context.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Android, iOS and desktop clients
|
|
2
|
+
|
|
3
|
+
Use for mobile/desktop security assessments and shipped artifacts. Separate client-local guarantees from backend enforcement and analysis-environment limitations. OWASP MASVS describes controls; MASTG supplies testing procedures. Consult current platform behavior for the target OS/SDK rather than applying legacy advice unchanged.
|
|
4
|
+
|
|
5
|
+
## Establish the exact artifact and environment
|
|
6
|
+
|
|
7
|
+
Record package/bundle ID, version/build, artifact hash, signing identity, architecture, minimum/target SDK or OS, distribution channel and relevant entitlements/permissions. Verify which device/emulator, profile and app instance the tools address. Preserve an original copy and analyze a working copy.
|
|
8
|
+
|
|
9
|
+
Map app -> OS/IPC -> local storage/key service -> network/backend -> third-party SDKs. Discover normal workflows and deep links, background services, local HTTP/IPC endpoints, extensions, notifications, update and recovery paths. Include native libraries, JavaScript bridges and WebViews. Backend APIs belong in [web and API](web-api.md), not just the mobile checklist.
|
|
10
|
+
|
|
11
|
+
Use available artifact-analysis tooling when appropriate. In clai, check REA availability and enable its shipped-artifact workflow when it applies; do not make REA a hard dependency, and do not send ordinary source repositories to a binary-analysis workflow. Otherwise choose installed unpackers, disassemblers, decompilers and instrumentation suited to the artifact.
|
|
12
|
+
|
|
13
|
+
## Android hypotheses
|
|
14
|
+
|
|
15
|
+
| Surface | Questions that distinguish a bug | Evidence to seek |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| Exported activities/services/receivers/providers | Can a different unprivileged app invoke sensitive behavior? Are permissions and caller identity checked at the right stage? | Controlled second-app/IPC invocation, actual permission context and consequence |
|
|
18
|
+
| Intents/deep links/app links | Can URI parsing, link ownership, task behavior or nested intent forwarding cross trust? | Complete entry -> transformation -> privileged action trace on the supported OS |
|
|
19
|
+
| Content/file providers and URI grants | Can caller-supplied path/URI or grant lifetime expose unintended files or objects? | Own sentinel accessed beyond intended scope; distinguish temporary grant from general access |
|
|
20
|
+
| PendingIntent and callbacks | Can another party modify, replay or redirect a privileged pending operation? | Concrete creator/recipient privileges, mutability and accepted altered action |
|
|
21
|
+
| WebView/JS bridges | Which origins can load, navigate and call native methods? Are messages origin/caller-bound? | Harmless untrusted content invoking a privileged bridge, not merely JavaScript enabled |
|
|
22
|
+
| Storage/backup/logs/clipboard/notifications | What lower-privilege or physical attacker can obtain sensitive state? | Non-root threat-model access or explicitly labeled rooted-device scenario |
|
|
23
|
+
| Keystore and local authentication | Is authentication cryptographically bound to key use and sensitive action? | Show the action succeeds under the actual attacker model, not only UI bypass |
|
|
24
|
+
| Network and signing/update | Is trust validation correct? Can a less-trusted update/plugin become code? | Original release behavior and artifact trust chain, not behavior created only by analyst patching |
|
|
25
|
+
|
|
26
|
+
Manifest flags, exported components and embedded strings are leads. Export can be intentional; a browser API key may be public; use of a weak primitive may protect non-security data. Trace reachability and impact before reporting.
|
|
27
|
+
|
|
28
|
+
## iOS hypotheses
|
|
29
|
+
|
|
30
|
+
Inspect entitlements, keychain accessibility/access groups, data protection classes, app groups/extensions, URL schemes/universal links, pasteboard/shares, WebViews/message handlers, network trust, local auth and update/signing assumptions. Check where OS-managed identity ends and app-supplied data begins.
|
|
31
|
+
|
|
32
|
+
Validate access on the relevant OS, lock state and device class. A jailbroken device can observe data that the supported production attacker cannot; report that precondition explicitly. A missing resilience technique or successful hook is not automatically an exploitable vulnerability.
|
|
33
|
+
|
|
34
|
+
## Desktop/Electron/Tauri and local services
|
|
35
|
+
|
|
36
|
+
Map renderer/web content -> preload/bridge -> privileged main process/plugin -> OS. Inspect navigation/window creation, sandbox/context isolation, Node exposure, IPC method permissions and sender/origin binding, custom protocols, file handlers, extensions and local service authentication.
|
|
37
|
+
|
|
38
|
+
For each IPC operation ask: who can call it, what input controls path/command/URL, what validation survives serialization, and whose authority executes it? Origin checks on the main window may not cover newly opened windows, custom schemes, frames or forwarded messages. Bridge exposure alone is not exploitation; show a lower-trust caller reaching a sensitive primitive.
|
|
39
|
+
|
|
40
|
+
Trace updater and installer trust: signer, artifact integrity, channel selection, rollback, writable staging paths, extraction, privilege elevation and restart behavior. A TLS URL alone is not the whole update guarantee. Use controlled artifacts; never ship a malicious update to users.
|
|
41
|
+
|
|
42
|
+
## Dynamic proof without confusing the threat model
|
|
43
|
+
|
|
44
|
+
Observe original behavior first. Interception, pinning bypass, hooks, repackaging and debug builds can help inspect internal paths but may remove the very control being assessed. Keep analyst-created capabilities separate from attacker capabilities. Reproduce the security effect in an unmodified supported configuration, or clearly state that the conclusion is limited to the instrumented build.
|
|
45
|
+
|
|
46
|
+
Use test accounts, canary files and an isolated device/profile. Avoid logging real tokens, accessing unrelated apps' data or retaining personal device captures. A finding should name package/build, OS, caller capability, trigger, observed boundary crossing, relevant logs/traces and cleanup.
|
|
47
|
+
|
|
48
|
+
## Variant and regression paths
|
|
49
|
+
|
|
50
|
+
After a confirmed component/bridge bug examine sibling components, equivalent methods, background paths, URI variants, secondary windows and shared libraries. Compare debug/release, upgrade/new install and supported OS differences when they change enforcement.
|
|
51
|
+
|
|
52
|
+
Retest legitimate flows and the exact lower-trust caller after remediation. Mark unavailable physical devices, entitlements, hardware-backed key behavior and backend roles as gaps. Emulator success or failure does not cover all supported devices.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Research beyond known templates
|
|
2
|
+
|
|
3
|
+
Use when observed behavior is unexplained, a mature system resists ordinary testing, a known issue needs variants, or the task explicitly calls for original vulnerability research. Novel research is a method for testing new hypotheses—not a promise to discover a zero-day. Age, popularity and a clean scan are not security proofs.
|
|
4
|
+
|
|
5
|
+
## Start with an invariant, not an exploit name
|
|
6
|
+
|
|
7
|
+
Describe the protected property in the target's own terms: identity stays bound to the action; a parser's validated object is the one later interpreted; a resource is consumed once; a lower-trust component cannot choose a privileged destination; a pointer remains valid until its last use; an upgrade cannot change who authorizes itself.
|
|
8
|
+
|
|
9
|
+
List assumptions each component makes about its neighbors. Prioritize assumptions enforced by convention, duplicated differently, invalidated asynchronously or invisible to normal tests. A useful hypothesis names a reachable input/state and predicts a security-relevant deviation. “There must be a zero-day here” has no predictive value.
|
|
10
|
+
|
|
11
|
+
## Discover where guarantees can diverge
|
|
12
|
+
|
|
13
|
+
| Research axis | Questions and useful experiments |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| Representation | Can two byte strings represent the same object, or one string mean different objects to validator and consumer? Compare normalization, encoding, duplicate fields, numeric precision and serializer behavior |
|
|
16
|
+
| Time | Is validation bound to execution time, resource version and identity? Reorder/replay/cancel/resume; change a controlled reference after approval; observe stale capabilities |
|
|
17
|
+
| Authority | Does a helper/worker/plugin act for the caller or itself? Follow delegated identity, tenant and consent across one edge at a time |
|
|
18
|
+
| Failure | What happens after timeout, partial commit, retry, parser error or unavailable verifier? Inject controlled failures in a safe replica and inspect state, not just error text |
|
|
19
|
+
| Composition | Do individually correct controls disagree when combined? Compare cache key versus authorization context, router versus origin, signature bytes versus interpreted object |
|
|
20
|
+
| Lifecycle | Does create/update/import/export/restore/migrate use the same enforcement? Test equivalent operations through distinct consumers |
|
|
21
|
+
| Concurrency | Is a request actually atomic? Identify sub-states, shared records, transaction scope, session locks, multi-process and worker interleavings |
|
|
22
|
+
| Boundary values | Empty/absent/null, zero/negative/extreme lengths, integer conversion, Unicode, recursion depth, container nesting and resource handles—only along a reachable path |
|
|
23
|
+
| History | What invariant did a previous patch restore? Inspect neighboring callers, old compatibility paths, partial fixes and backports for the same missing assumption |
|
|
24
|
+
| Deployment | Does the built/released/feature-flagged code differ from the reviewed source or test harness? Compare exact artifacts and runtime configuration |
|
|
25
|
+
|
|
26
|
+
Choose axes from system evidence. This table is a generator of questions, not a request to spray every encoding or sequence.
|
|
27
|
+
|
|
28
|
+
## Research a lead without anchoring
|
|
29
|
+
|
|
30
|
+
Write two competing explanations: the security hypothesis and the strongest benign explanation. Define a test whose outcomes differ. Before investing further verify the observed component, request, build, identity and instrumentation. Promote the lead when the result improves causal confidence or reveals a new boundary—not because it is exciting.
|
|
31
|
+
|
|
32
|
+
When unfamiliar, search by component/version + observed behavior + violated property. Prefer protocol/runtime documentation, vendor advisories and patches, original research, release notes and reproducible tests. Read the prerequisites and limitations, not just search snippets. Separate a technique that exists from a technique applicable to this configuration. Treat exploit repositories and sample binaries as untrusted; inspect and isolate before executing.
|
|
33
|
+
|
|
34
|
+
Do not overfit to a remembered CVE. The root cause might be a product-specific state machine or a novel composition. Conversely, an unfamiliar symptom can be a known bug with different packaging. Keep novelty separate from validity and impact.
|
|
35
|
+
|
|
36
|
+
## Choose the analysis engine from the question
|
|
37
|
+
|
|
38
|
+
- **Manual tracing:** best when authority, workflow or a small causal path matters more than input volume.
|
|
39
|
+
- **Static/dataflow analysis:** useful for scaling a known source/sink/root-cause family; validate guards and runtime dispatch.
|
|
40
|
+
- **Dynamic tracing/instrumentation:** useful when wrappers, generated code, IPC, binary dispatch or timing hide the real consumer.
|
|
41
|
+
- **Property/stateful testing:** useful when a compact invariant should hold over many sequences.
|
|
42
|
+
- **Differential testing:** useful when two implementations, versions, platforms or parsers should agree on a defined property.
|
|
43
|
+
- **Coverage-guided fuzzing:** useful when a reachable parser/state machine can be safely and repeatedly exercised.
|
|
44
|
+
- **Constraint/symbolic reasoning:** useful for a bounded difficult path with explicit constraints; model errors and path explosion can dominate.
|
|
45
|
+
|
|
46
|
+
Combine methods when each resolves a specific uncertainty. Running several engines without an oracle or a target model is expensive enumeration, not research.
|
|
47
|
+
|
|
48
|
+
## Construct an oracle that detects the real failure
|
|
49
|
+
|
|
50
|
+
An oracle answers whether the invariant failed. Examples: cross-tenant canary visibility; invalid state after a controlled transaction; sanitizer-detected out-of-bounds access; different acceptance of an authenticated object; an unauthorized tool action independently recorded.
|
|
51
|
+
|
|
52
|
+
Response status, timing, coverage and crashes are proxies. Explain what each proxy can and cannot distinguish. For timing use interleaved controls and enough bounded samples to assess noise; seek a direct effect where possible. For differential behavior identify which specification/invariant says the difference is wrong. Two implementations can disagree without either being exploitable.
|
|
53
|
+
|
|
54
|
+
Metamorphic relationships can supply oracles when outputs are hard to predict: a round-trip preserves the defined canonical object; irrelevant field order doesn't change authority; revoking a role doesn't expand access; a replay doesn't duplicate a one-time operation. Verify the relationship is actually promised by the target—don't report valid non-canonical behavior as a flaw.
|
|
55
|
+
|
|
56
|
+
## Fuzzing that reaches useful code
|
|
57
|
+
|
|
58
|
+
Use a safe harness/replica, not unconstrained production traffic. Record exact source/artifact revision, toolchain, sanitizer/instrumentation, harness, corpus, options, seed and limits.
|
|
59
|
+
|
|
60
|
+
A useful harness:
|
|
61
|
+
|
|
62
|
+
- Invokes the real target path with valid enough outer structure to reach interesting logic.
|
|
63
|
+
- Accepts empty, malformed and large inputs without failures caused only by the harness.
|
|
64
|
+
- Resets per-case state or deliberately models state sequences, including session/identity context.
|
|
65
|
+
- Avoids uncontrolled network, filesystem and external process side effects; joins/cleans resources per case.
|
|
66
|
+
- Is deterministic where feasible and fast enough for feedback to matter.
|
|
67
|
+
- Has a known valid seed and a deliberately failing oracle/control proving the detector works.
|
|
68
|
+
|
|
69
|
+
Choose mutation structure deliberately: dictionaries for magic/constants; grammar/schema-aware generation for nested formats; valid checksums/signatures for layers preceding the target; stateful action sequences for business protocols. If checks block coverage, use a dedicated analysis build to reach deeper logic but keep that altered precondition out of exploitability claims.
|
|
70
|
+
|
|
71
|
+
Inspect real code/edge/state coverage, corpus diversity and time spent in the intended target. Executions per second and fuzzer uptime alone are not progress. If plateaued, inspect barriers and update seeds/harness/oracle before merely extending runtime. State which code/behaviors were never reached.
|
|
72
|
+
|
|
73
|
+
## Minimize, explain, reproduce
|
|
74
|
+
|
|
75
|
+
For a failure preserve the original input/state, then minimize bytes, fields, operations and timing dependencies without losing the security effect. Reproduce in a fresh process/session and the relevant unmodified build. Separate harness/monitor defects, expected rejections and environmental failures from product bugs.
|
|
76
|
+
|
|
77
|
+
Produce a causal explanation: attacker-controlled input -> missing/wrong check or lifetime/state assumption -> forbidden operation -> demonstrated consequence. For memory corruption characterize the primitive and mitigations separately from speculative code execution. For logic bugs inspect persistent state independently from a success response.
|
|
78
|
+
|
|
79
|
+
## Variant search from a root cause
|
|
80
|
+
|
|
81
|
+
Extract the missing invariant rather than a vulnerable function's spelling. Validate a search against the known instance. Expand along distinct meaningful relationships: shared validator/sink, sibling interfaces, callers/overrides, alternate types/encodings, async paths, versions and platforms. Broaden one causal axis at a time so noise can be explained.
|
|
82
|
+
|
|
83
|
+
For every candidate check attacker control, reachability, dominating guards, context and consequence. Record why a candidate is refuted or blocked. Don't count nearby code as a variant or duplicate multiple manifestations into inflated finding counts. If one root-cause fix covers them all, group them and name materially distinct impacts.
|
|
84
|
+
|
|
85
|
+
Search historical fixes for incomplete coverage and semantic substitutes: a removed exact pattern may still exist through another helper or representation. Conversely, don't endlessly re-run a broad query that only generates known benign matches. Preserve the envelope and reopen only on a meaningful change.
|
|
86
|
+
|
|
87
|
+
## Build only compatible chains
|
|
88
|
+
|
|
89
|
+
Represent an edge with input capability, exact preconditions, action, resulting capability, evidence and side effects. To compose edges, verify that the first result actually satisfies the next prerequisites under the same identity/network/state/version context. An SSRF that only performs GET cannot automatically invoke a POST-only control plane; a credential restricted to one resource doesn't imply account-wide compromise.
|
|
90
|
+
|
|
91
|
+
Use the minimum proof that resolves the objective. Discuss plausible untested consequences separately. Do not perform destructive or sensitive-data impact just to replace a safely demonstrated capability with a more dramatic screenshot.
|
|
92
|
+
|
|
93
|
+
## Exit, park or continue
|
|
94
|
+
|
|
95
|
+
Continue when a reachable unexplained anomaly, untested important invariant or promising new evidence offers a realistic gain. Pivot when repetitions no longer distinguish explanations, prerequisite access is absent, or another boundary has higher supported value. A well-recorded refutation is progress; sunk cost is not a reason to grind.
|
|
96
|
+
|
|
97
|
+
Before a long pause preserve exact artifacts, minimized case, competing explanations, failed experiments with envelopes, research sources and one next discriminating test. State budget/runtime limits honestly. Never call a bug “zero-day” merely because a search found no match; describe it as apparently undocumented pending vendor/advisory/history checks and coordinated disclosure through the agreed process.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Engagement control and efficient persistence
|
|
2
|
+
|
|
3
|
+
Use for substantial assessments and long investigations. Adapt the amount of state to the task. Do not create a bureaucracy before a single useful test.
|
|
4
|
+
|
|
5
|
+
## Objective and system model
|
|
6
|
+
|
|
7
|
+
Translate the objective into an observable outcome: demonstrate cross-tenant read/write, evaluate a control, validate a reported issue, assess material exposed boundaries, test a specified adversary path, or resolve an incident hypothesis. A red-team objective reached does not imply a full vulnerability assessment; an audit with no findings does not imply no attack path.
|
|
8
|
+
|
|
9
|
+
Identify the operating constraints that change the next action: production versus clone, allowable state changes, tested identities, third parties, address ranges, egress, test window, physical access, rate/concurrency limits, account lockout, evidence retention and cleanup. Resolve scope-changing ambiguity before acting on the uncertain asset; continue independent known-in-scope work. Discovery of an address, credential, subsidiary or vendor does not itself expand authorization.
|
|
10
|
+
|
|
11
|
+
Draw the smallest useful graph:
|
|
12
|
+
|
|
13
|
+
`actor/capability -> entry -> transformation/decision -> privileged action -> asset`
|
|
14
|
+
|
|
15
|
+
Add transport/identity/state labels to edges. Include both control and data planes: UI to API; API to queue; queue to worker; client to local service; federated identity to tenant; pod to node; Wi-Fi client to wired network. Ask which component believes which other component already checked authorization or canonicalized input.
|
|
16
|
+
|
|
17
|
+
## A lightweight working ledger
|
|
18
|
+
|
|
19
|
+
Reuse an engagement's existing artifacts. For multi-stage work, keep these records in an appropriate engagement directory or durable task state, not global project instructions. Store sensitive captures separately from redacted summaries. A compact Markdown table or JSONL file is enough; do not build a database unless needed.
|
|
20
|
+
|
|
21
|
+
| Record | Minimum useful content |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Objective | desired effect/control, proof condition, exclusions, budget |
|
|
24
|
+
| Surface | stable ID, asset/interface, version/vantage, principal/role, operation/object/state, boundary, source of discovery |
|
|
25
|
+
| Hypothesis | linked surface, invariant, mechanism, preconditions, confirming/refuting signal, next experiment, priority rationale |
|
|
26
|
+
| Experiment | input/command, baseline/control, timestamp/timezone, tool version, context, artifact pointers, observation, interpretation |
|
|
27
|
+
| Finding | attacker path, consequence, confidence, reproduction, root cause, sibling/chain links, cleanup |
|
|
28
|
+
| Gap | untested boundary, reason, impact on confidence, access or experiment needed to resolve |
|
|
29
|
+
|
|
30
|
+
Use dispositions precisely:
|
|
31
|
+
|
|
32
|
+
- **Queued/active:** a candidate with a specific next experiment, not a vulnerability.
|
|
33
|
+
- **Observed:** behavior recorded; mechanism or impact not yet established.
|
|
34
|
+
- **Confirmed:** security consequence demonstrated under the recorded preconditions.
|
|
35
|
+
- **Refuted for this case:** a stated mechanism contradicted by a discriminating test; not the whole vulnerability class ruled out.
|
|
36
|
+
- **Parked:** currently low-yield; preserve evidence and what would make it worth reopening.
|
|
37
|
+
- **Blocked:** missing access, hardware, approval, availability or another prerequisite.
|
|
38
|
+
- **Not applicable:** architecture or product behavior gives a defensible reason, with evidence.
|
|
39
|
+
- **Untested:** discovered but no adequate assessment yet. Never relabel this “passed.”
|
|
40
|
+
|
|
41
|
+
A negative result has an envelope: build, vantage, principal, operation, representation, state and experiment. Reopen it when a material part of the envelope changes. Deduplicate by that envelope and hypothesis, not just URL or function name.
|
|
42
|
+
|
|
43
|
+
## Cover the boundary, not just the inventory
|
|
44
|
+
|
|
45
|
+
For each material family, consider actor/role/tenant, object ownership, operation, lifecycle state, entrypoint/protocol, representation and deployment. Select equivalence classes based on shared enforcement, not superficial naming. If REST and GraphQL share a service but authorize in separate resolvers, they are not one tested surface. If one shared middleware is verified, representative checks can support broader coverage with an explicit sampling rationale.
|
|
46
|
+
|
|
47
|
+
Discovery channels complement each other:
|
|
48
|
+
|
|
49
|
+
- Black box: observed traffic, linked resources, DNS/TLS, service negotiation, documentation, errors, normal workflows.
|
|
50
|
+
- Authenticated: each role's routes, exports/imports, lifecycle transitions, admin/support, APIs behind the UI.
|
|
51
|
+
- Artifacts/source: manifests, routes, generated clients, schemas, workers, configs, build metadata, changelogs.
|
|
52
|
+
- Runtime: actual process/IPC/network/file behavior, traces, logs and policy evaluation.
|
|
53
|
+
|
|
54
|
+
Reconcile differences: documented but unexposed, deployed but undocumented, UI-hidden but server-callable, main path patched but worker still vulnerable. Breadth comes from finding meaningful boundaries, not indiscriminate enumeration.
|
|
55
|
+
|
|
56
|
+
## Choose the next experiment
|
|
57
|
+
|
|
58
|
+
Use a qualitative comparison, not invented arithmetic:
|
|
59
|
+
|
|
60
|
+
- **Impact:** Which protected asset or invariant would fail? How valuable is the next edge?
|
|
61
|
+
- **Evidence:** Does observed behavior support the precondition, or is it merely imaginable?
|
|
62
|
+
- **Reachability:** Can the actual attacker reach it under the engagement's identity and network conditions?
|
|
63
|
+
- **Information gain:** Will the result separate competing explanations or unlock many sibling tests?
|
|
64
|
+
- **Cost and risk:** How much setup, runtime, noise, state change or collateral risk is involved?
|
|
65
|
+
- **Coverage debt:** Which important boundary has been neglected while a deep lead consumed attention?
|
|
66
|
+
|
|
67
|
+
Prefer tests that distinguish hypotheses. Example: if an export may ignore tenant context, another injection scanner adds little. Two controlled tenants and an export created before membership revocation can distinguish per-request checks from a worker's stale authorization.
|
|
68
|
+
|
|
69
|
+
Do the fast prerequisite test before an expensive exploit. Preserve promising anomalies even when temporarily blocked; do not let them trigger speculative full chains. Do not invent fixed percentages, tool-derived certainty, or priorities solely from a CVSS banner.
|
|
70
|
+
|
|
71
|
+
## Escalation ladder for a promising anomaly
|
|
72
|
+
|
|
73
|
+
1. Verify target, routing, session, request and artifact are the intended ones.
|
|
74
|
+
2. Reproduce against baseline/control and remove accidental variables.
|
|
75
|
+
3. Localize the responsible component or state transition using one changed dimension.
|
|
76
|
+
4. Research implementation, patch history, protocol guarantees or source code.
|
|
77
|
+
5. Build the smallest harness/PoC that observes the security invariant directly.
|
|
78
|
+
6. Challenge with a benign explanation, boundary case and alternate observation channel.
|
|
79
|
+
7. Establish bounded impact, then examine siblings or a supported chain.
|
|
80
|
+
|
|
81
|
+
Enter wherever evidence permits. This is not a requirement to execute seven steps for every lead.
|
|
82
|
+
|
|
83
|
+
## Stalls, failures and pivots
|
|
84
|
+
|
|
85
|
+
| Observation | Decision-changing next move |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| Identical status/body across nonexistent and interesting paths | Fingerprint the catch-all before more discovery; retain meaningful size/status/redirect differences |
|
|
88
|
+
| Every request is challenged | Distinguish edge/WAF response from application behavior; acquire legitimate session or approved alternate vantage |
|
|
89
|
+
| PoC fails before reaching vulnerable logic | Fix prerequisite, version, feature flag, encoding or harness; record path reachability separately |
|
|
90
|
+
| Same payload produces unstable timing | Interleave baseline/control, inspect queue/caching/network effects, use a direct state or callback oracle |
|
|
91
|
+
| Static taint path stops at a wrapper | Trace runtime dispatch, validator order, transformations and downstream interpretation |
|
|
92
|
+
| Fuzzer is busy but no meaningful coverage grows | Check harness reachability, seed validity, dictionaries, state reset and gate conditions |
|
|
93
|
+
| Repeated changed inputs yield no new distinction | Park this mechanism with its envelope; advance a different unresolved boundary |
|
|
94
|
+
| One finding explains many alerts | Group the root cause, verify representative variants; don't inflate counts |
|
|
95
|
+
| New credential or role appears | Revalidate scope and capability, add new identity-boundary tests; don't automatically spray or dump secrets |
|
|
96
|
+
|
|
97
|
+
A retry needs a new reason and a distinct predicted result. A tool installation problem is not a target vulnerability. A blocked experiment is not a failed security control. Don't route around permission denials, and don't treat removing a control in a clone as proof that production is exploitable.
|
|
98
|
+
|
|
99
|
+
## Concurrency and long-running work
|
|
100
|
+
|
|
101
|
+
Use only available, authorized orchestration. Delegate genuinely independent investigations with explicit surfaces and expected evidence; keep final causal verification with the owner. Do not have multiple workers duplicate scans, mutate the same state, or contaminate each other's timing/cache experiments. Schedule race tests deliberately rather than accidentally.
|
|
102
|
+
|
|
103
|
+
Use clai's actual job lifecycle: long finite jobs belong to the supported durable/Responder mechanism; interactive logins need an owned terminal; servers/watchers are not finite analysis jobs. Track artifacts and read terminal results before drawing conclusions. Parallelize research or another surface while a job runs; don't poll repeatedly or relaunch a live equivalent.
|
|
104
|
+
|
|
105
|
+
A checkpoint should preserve scope, versions, verified facts, working identities by secure reference, exact artifact paths, open/parked/blocked hypotheses, running job IDs, changed state and the next discriminating experiment. Resume from evidence rather than redoing the engagement. Never persist client credentials or sensitive findings in a reusable skill or public memory.
|
|
106
|
+
|
|
107
|
+
## Closure decision
|
|
108
|
+
|
|
109
|
+
Close the requested boundary when its proof conditions hold and material feasible work would no longer change the result. For a comprehensive assessment, this requires reconciling the surface ledger and important sibling/alternate paths—not just reaching one goal. If a budget or prerequisite prevents this, stop honestly at that limit and describe the frontier. A clean result can be valid; inventing a vulnerability to satisfy a motivational instruction cannot.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Security operations, hunting, detection and response
|
|
2
|
+
|
|
3
|
+
Use when the objective is investigate, detect, contain or validate defensive controls. Do not turn a suspected active incident into an offensive exploitation exercise. NIST SP 800-61 Rev. 3 places detection, response and recovery within broader risk management; adapt to the organization's incident authority and process.
|
|
4
|
+
|
|
5
|
+
## Classify the job
|
|
6
|
+
|
|
7
|
+
- **Threat hunt:** test a behavior hypothesis using available evidence; success includes a well-bounded negative result and visibility gaps.
|
|
8
|
+
- **Detection validation/purple team:** distinguish successful execution, telemetry, rule match, alert delivery, analyst action and containment.
|
|
9
|
+
- **Incident response/forensics:** establish what happened and current risk while preserving evidence; containment may take precedence over complete observation under the incident lead's authority.
|
|
10
|
+
- **Exposure/vulnerability management:** verify applicability and reachable impact; prioritize remediation, then retest actual enforcement.
|
|
11
|
+
|
|
12
|
+
Confirm objective, time window/timezone, hosts/identities, data sources, retention and response authority. Recover existing incident scope rather than scanning adjacent systems by default.
|
|
13
|
+
|
|
14
|
+
## Evidence before interpretation
|
|
15
|
+
|
|
16
|
+
Preserve raw logs/artifacts with acquisition time, source, hash where appropriate and chain of custody. Work on copies; note time skew, ingestion delay, sampling, parser changes and collection gaps. Do not erase logs or “clean up” suspicious files before preserving evidence and receiving response direction.
|
|
17
|
+
|
|
18
|
+
Build a timeline that separates event time, ingest time and analyst observation. Correlate stable identifiers: principal/session, host/process tree, request/correlation ID, source/destination, cloud resource, file hash and related transaction. An IP address alone rarely establishes actor identity.
|
|
19
|
+
|
|
20
|
+
Record known facts, alternative explanations and the next discriminating query. An alert may be a true detection of benign admin/test activity; no alert may be missing telemetry rather than absent attacker behavior.
|
|
21
|
+
|
|
22
|
+
## Hunting from behaviors
|
|
23
|
+
|
|
24
|
+
Start with a concrete claim: a lower-tier identity requested unusual privileged access; a workload identity was used outside its normal context; an update child process performed an unexpected network action. Choose telemetry that can actually observe the behavior and explicitly state what it cannot observe.
|
|
25
|
+
|
|
26
|
+
Map relevant behavior to verified current ATT&CK/ATLAS techniques, but don't let the framework suppress unmodeled activity. Query a bounded cohort/time range, inspect representative raw records and compare a legitimate baseline. Expand scope/time based on linked evidence rather than searching every index indiscriminately.
|
|
27
|
+
|
|
28
|
+
Useful pivots include identity -> sessions -> devices -> processes -> network -> resources -> resulting state. Preserve causal uncertainty: a shared service account, NAT, proxy, VPN or delayed log delivery can make a superficially compelling chain false.
|
|
29
|
+
|
|
30
|
+
## Detection validation as a pipeline
|
|
31
|
+
|
|
32
|
+
| Stage | Evidence needed | Frequent false conclusion |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| Execution | Actual action/outcome in the relevant security context | Tool exit zero means technique worked |
|
|
35
|
+
| Sensor | Raw event with required fields/time/source | “No alert” means no event |
|
|
36
|
+
| Ingestion/parsing | Event reached the correct dataset with usable fields | Local log proves SIEM visibility |
|
|
37
|
+
| Rule/analytic | Exact rule version, conditions, window, match/suppression result | One matched event proves all variants covered |
|
|
38
|
+
| Alert/case | Routing, severity, dedup/suppression and delivery | Rule match means analyst saw it |
|
|
39
|
+
| Response | Documented analyst/control action and effective containment | An alert means the attack was blocked |
|
|
40
|
+
|
|
41
|
+
Use controlled benign emulation and agreed test windows. Verify cleanup and don't disable defensive controls or erase evidence to obtain a successful demonstration. When a test fails, localize the missing pipeline stage before changing the detection rule or rerunning the attack.
|
|
42
|
+
|
|
43
|
+
Test representative alternate procedures when they materially change observability: different parent/child process context, identity source, API, runtime or platform. Do not claim technique-wide coverage from a single known signature. Balance recall against legitimate baseline false positives and operational cost.
|
|
44
|
+
|
|
45
|
+
## Response decisions
|
|
46
|
+
|
|
47
|
+
For a live incident, state the containment decision, expected risk reduction, evidence lost, business impact and reversibility. Coordinate host isolation, session revocation, key rotation, blocking and restoration through the incident authority. Do not rotate, delete or quarantine unilaterally just because access exists.
|
|
48
|
+
|
|
49
|
+
Determine initial access, executed actions, persistence, credential/token exposure, affected assets and scope of impact to the extent evidence supports them. Avoid unsupported attribution and precise dwell-time claims beyond retention. Distinguish evidence of access, collection, staging and actual exfiltration.
|
|
50
|
+
|
|
51
|
+
## Remediation and recovery proof
|
|
52
|
+
|
|
53
|
+
Verify the defect/control was addressed on the affected build/configuration and that compromised credentials/sessions cannot still act. Confirm legitimate business behavior and required telemetry survive the fix. Recovery is not just a service becoming reachable; validate integrity, restored trust and monitoring for recurrence.
|
|
54
|
+
|
|
55
|
+
Deliver timeline, scope, confidence and alternatives, evidence references, containment/remediation actions actually taken, residual exposure, unobservable periods and next owner/actions. Use [evidence and closure](evidence-reporting.md) for concise defensible findings and retest outcomes.
|