Skip to content

Release v1.8.0 - True Authority & Complete Lifecycle - #73

Open
ikaruscareer wants to merge 24 commits into
mainfrom
release/v1.8.0
Open

Release v1.8.0 - True Authority & Complete Lifecycle#73
ikaruscareer wants to merge 24 commits into
mainfrom
release/v1.8.0

Conversation

@ikaruscareer

Copy link
Copy Markdown
Owner

Release v1.8.0 — True Authority & Complete Lifecycle

Theme: CE 1.4 + CE 1.5 + CE 1.8 closure — the gate for CE 2.0.

Workstream 1: Lifecycle & Ownership (CE 1.4)

  • Finding Lifecycle Event Engine (finding_lifecycle table, schema v4)
  • Stale Suppression Guard (fingerprint-bound waivers)
  • Agent Enrichment Schema (safeai registry metadata set, agent_metadata table)

Workstream 2: Code-Level Authority (CE 1.5)

  • Tool ↔ Implementation Mapping (orphan detection)
  • Command-Aware MCP Resolution (assurance: resolved vs unresolved-command)
  • Target Taxonomy Engine (Database / Object Storage / SaaS API buckets)

Workstream 3: Detection Depth

  • Prompt risk depth (multi-line, cross-file, indirect injection, XML/HTML injection)
  • Data leakage depth (private keys, JWT, AWS keys, connection strings, base64/hex)
  • Cross-component analysis (component_graph.py — skill→tool→workflow→MCP→model)

Workstream 4: Community & Onboarding

  • Expanded community scan targets from 5 to 25
  • safeai welcome guided first-run experience

Tests: 432 passed, 1 skipped
Registry schema: v4

…ecycle table)

- Add finding_lifecycle table (schema v4) tracking introduced/persisting/reopened events
- Persist lifecycle events during scan for longitudinal finding tracking
- Add query functions: finding_lifecycle, finding_lifecycle_summary, recurring_risks
- Export new functions from registry __init__.py
- Bump REGISTRY_SCHEMA_VERSION from 3 to 4
- Add detect_stale_suppressions() to check if fingerprint-bound suppressions
  no longer match any current finding (code has materially shifted)
- Integrate stale detection into --strict-suppressions CI failure path
- Stale suppressions produce warnings and are recorded in report output
…y metadata CLI)

- Add agent_metadata table (owner, environment, purpose, lifecycle_status)
- Add get_agent_metadata / set_agent_metadata query functions
- Add 'safeai registry metadata set/get' CLI subcommands
- Export new functions from registry __init__.py
- New analysis module tool_implementation.py correlating declared tools
  with implementations found via static analysis
- Surfaces TOOL_ORPHAN_DECLARED finding when a tool is referenced in
  configuration but no implementation exists in the scanned codebase
- Integrated into orchestrator assemble stage after dependency correlation
- Add _resolve_command() to statically resolve local MCP server commands
  against the scanned codebase
- Label servers with assurance: resolved vs unresolved-command
- Emit MCP_UNRESOLVED_COMMAND finding when a server command cannot be resolved
- Integrated into MCP analyzer's server processing pipeline
- New analysis module target_taxonomy.py aggregating external-network
  capabilities into destination buckets: Database, Object Storage,
  SaaS APIs, Cloud Services, Messaging
- Classifies capabilities from tool surface and MCP assets
- Integrated into orchestrator assemble stage as report['target_taxonomy']
- Multi-line prompt concatenation detection (PROMPT_MULTI_LINE_CONCAT)
- Cross-file prompt interpolation detection (PROMPT_CROSS_FILE_INTERP)
- Indirect injection via tool calls in prompts (PROMPT_INDIRECT_INJECTION)
- XML/HTML tag injection in prompts (PROMPT_XML_INJECTION)
- Template variable injection in .md/.txt/.prompt files (PROMPT_TEMPLATE_INJECTION)
- RSA/EC/DSA/OpenSSH private key detection (severity: critical)
- JWT token detection (severity: high)
- AWS access key detection AKIA/ASIA pattern (severity: critical)
- Connection string detection mongodb/postgres/mysql/redis etc (severity: high)
- Base64-encoded secret detection (severity: medium)
- Hex-encoded secret detection (severity: medium)
- Per-pattern severity differentiation via _SEVERITY_WEIGHTS
- component_graph.py: builds directed skill→tool→workflow→MCP→model graph
- Analyzes orphaned references (ref pointing to non-existent component)
- Detects high tool coupling across skills and workflows
- Integrated into orchestrator assemble() stage
- Report includes component_graph with edges, adjacency, orphaned_refs
Added 20 new AI tool targets across all categories:
- workflow-and-agent-platform: Dify, Flowise, Activepieces, Composio
- llm-application-framework: Haystack, Semantic Kernel, DSPy, Instructor
- multi-agent-framework: AutoGen, MetaGPT, ChatDev, CAMEL
- rag-and-agent-framework: RAGFlow, Quivr, txtai, kotaemon
- stateful-agent-orchestration: Temporal, Inngest, Mastra, Agno

Updated test_target_entries_in_manifest to validate >=25 targets.
New CLI subcommand that guides new users through:
1. Recommended rules and custom rule setup
2. First scan commands with output options
3. Understanding results (severity, OWASP LLM, fail-on gates)
4. Registry (KYA) inspection commands
5. Links to documentation (README, User Guide, Reporting Guide, etc.)
- ROADMAP.md: mark CE 1.8 items as shipped, update current state
- CHANGELOG.md: mark all 4 workstreams as shipped, add Workstream 4
- RELEASE_NOTES.md: mark v1.8.0 as shipped, update definition of done
- GITHUB_RELEASE.md: mark v1.8.0 as shipped, add Workstream 4
- Fix ruff lint issues in prompt analyzer (SIM102 nested ifs)
- Emit 'resolved' events for fingerprints in previous scan but absent from current scan
- Update findings table status to 'resolved' for resolved fingerprints
- Explicitly enumerate expected statuses with defensive fallback comment
- ESC_RECURRING_RISK can now fire end-to-end when finding is reintroduced
- Implement TOOL_ORPHAN_IMPLEMENTED for tools found in code but not declared
- Add TOOL_ORPHAN_DECLARED and TOOL_ORPHAN_IMPLEMENTED to base_rules.yaml
- Add orphaned_implemented count to summary dict
- Both orphan directions now match documentation claims
- D.1: Consolidate double sort in orchestrator - single sort after all findings appended
- D.2: Document coupling threshold with _TOOL_COUPLING_THRESHOLD constant
- D.3: Harden command resolution - detect npx/uvx/docker as external-package
- Fix composio default_ref: master -> next (actual default branch)
- Fix txtai default_ref: main -> master (actual default branch)
- Fix atheris version: 3.1.0 -> 3.0.0 (latest available version)
- Change hardcoded 5-target assertion to check >= 25 targets
- Verify original targets (n8n, langchain, crewai) are present
- Read last known file_path and line from scan_findings table
- Use actual previous_event from lifecycle history (not hardcoded)
- NULL preserved when location unavailable (never fabricated)
- Extract path/line provenance from components, skills, workflows
- Create normalized provenance dicts for each tool reference
- Include deterministic mappings in summary with status
- Both orphan findings now include file/line provenance when available
- Sort edges by (from, to, kind) before returning
- Sort adjacency and reverse_adjacency lists
- Sort bucket entries by stable keys
- Sort summary and display_name keys
- Output is now deterministic independent of input ordering
- PROMPT_INDIRECT_INJECTION: severity high->medium, added 'pattern detected' wording
- PROMPT_XML_INJECTION: severity medium->low, added 'pattern detected' wording
- Both now use 'Heuristic:' prefix in reason text
- Score contributions reduced to match severity
- Mark Workstream 2 as shipped with provenance details
- Mark Workstream 3 as shipped with deterministic output details
- Add fixes section documenting post-review corrections
- Document lifecycle provenance, tool provenance, deterministic output
- PIE810: combine key.startswith('mcp:') or key.startswith('mcp_server:')
  into key.startswith(('mcp:', 'mcp_server:'))
H1: COMPONENT_ORPHANED_REF findings now carry file/line provenance by
resolving the orphaned target's referencing component via reverse_adjacency
(previously emitted with empty file/line, making them non-actionable).
Shared _component_key() helper to keep node keys consistent.

H2: add unit tests for the three new analysis modules:
- test_tool_implementation.py (matching, orphan provenance, mcp skip, determinism)
- test_component_graph.py (orphan provenance, edge kinds, determinism)
- test_target_taxonomy_engine.py (bucket classification, mcp aggregation, determinism)

Also fix taxonomy dropping non-matching capabilities: 'other' bucket is
now populated instead of silently discarding unmatched caps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant