Skip to content

New Title - #13

Merged
dan-petty merged 2 commits into
release/v0.1.12from
feat/security-and-self-improvement-loop
Aug 18, 2026
Merged

dan-petty merged 2 commits into
release/v0.1.12from
feat/security-and-self-improvement-loop

Conversation

@dan-petty

@dan-petty dan-petty commented Aug 18, 2026 •

Copy link
Copy Markdown
Owner

Summary & Motivation

Addresses findings identified in review session .data/reviews/20260818-131043/findings.json, hardens Kubernetes and DevContainer manifests, enhances the finding verification pipeline and self-improvement feedback loop, and adds multi-tier finding sorting and MCP environment resolution.

Key Changes

  • Finding Verification & Self-Improvement Calibration:
    • Enhanced src/devops_cli/ai/tasks/verify_finding.md and src/devops_cli/ai/review/verification.py to explicitly reject speculative or hypothetical assumptions (e.g. shell=True assumptions on list commands, non-existent CVEs, valid syntax constructs).
    • Updated verification pipeline to capture structured invalidation_reason and confidence_score into findings.json, enabling rich export via devops ai review export-feedback for prompt tuning and DPO alignment.
    • Refined src/devops_cli/ai/personas/devsecops/prompt.md with strict evidence-grounding rules and clean single-line location constraints.
  • Multi-Tier Finding Sorting & Exploitability Normalization:
    • Implemented multi-tier finding sorting in src/devops_cli/ai/review_schema.py ordering findings by severity, exploitability, verification status, and confidence.
    • Added robust exploitability string normalization and sorted_findings properties across review payloads.
    • Updated findings CLI table in src/devops_cli/commands/review.py with an Exploitability column.
  • DevContainer Manifest Validation & Lifecycle Hardening:
    • Enforced path containment checks in src/devops_cli/commands/devcontainer.py to ensure referenced Dockerfiles reside strictly within the workspace.
    • Added semantic version regex validation for --python in devops devcontainer init.
    • Added automated system-wide /usr/local/bin/uv and /usr/local/bin/uvx symlink verification to ensure non-login MCP subagents resolve uv without path issues.
  • Kubernetes Manifest Hardening:
    • Added explicit namespace: argocd in k8s/argocd/kustomization.yaml.
    • Hardened Valkey deployment in k8s/llm/valkey.yaml with securityContext (runAsNonRoot: true, capability drops) and changed internal caching service to ClusterIP.
    • Pinned immutable release tag (v0.5.11) in k8s/llm/values-open-webui.yaml.

Validation

  • uv run pytest tests/test_devcontainer.py tests/test_review_pipeline.py tests/test_mcp.py — 45 passed.
  • uv run ruff check . & uv run ruff format --check . — all passed.
  • uv run devops docs check — docs and README matrix verified up-to-date.

Copilot AI lite review requested due to automatic review settings August 18, 2026 15:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…lization, and devcontainer mcp path resolution
@dan-petty
dan-petty changed the base branch from main to release/v0.1.12 August 18, 2026 15:27
@dan-petty
dan-petty merged commit 39d353f into release/v0.1.12 Aug 18, 2026
1 check passed
@dan-petty
dan-petty deleted the feat/security-and-self-improvement-loop branch August 18, 2026 15:34
dan-petty added a commit that referenced this pull request Aug 21, 2026
* fix(security): resolve review findings, harden manifests, and calibrate verification loop (#13)

* fix(security): resolve review findings, harden manifests, and calibrate verification loop

* fix(review): enhance multi-tier finding sorting, exploitability normalization, and devcontainer mcp path resolution

* feat(sdlc): add pr governance, remote ci inspection, and fastmcp tools (#14)

* feat(sdlc): add pr governance, remote ci inspection, and fastmcp tools

* docs(release): bump version to 0.1.12, update changelog and clean up review defaults

* test(metadata): update expected version assertion to 0.1.12

* feat(ai): integrate RAG, telemetry observability, and metadata re-ranking

- Add universal RAG architecture with polyglot AST chunking and hierarchical doc chunking
- Add structural metadata extraction for imports, security tags, and frontmatter
- Implement multi-signal search re-ranking with symbol bonuses and intent classification
- Integrate RAG context retrieval across all devops ai subcommands (chat, pipeline, agents, analyze, review)
- Add OpenTelemetry tracing instrumentation, Jaeger UI, and Grafana monitoring dashboards
- Add autonomous devcontainer git daemon background service
- Update CLI references, documentation, and CHANGELOG for v0.1.12

* feat(security): integrate full security tool suite with ai review and agent personas

- Add PyCQA Bandit static scanner integration (devops_cli.security.bandit)
- Expose scan_trivy, scan_kubelinter, scan_pluto, scan_bandit, and scan_popeye as native agent tools
- Inject aggregated static findings across Trivy, Kube-Linter, Pluto, and Bandit during Stage 2 review payload initialization
- Update devsecops persona prompt with instructions to verify pre-injected findings and call security tools
- Add unit tests for Bandit integration and multi-scanner payload aggregation

* fix(review): address review findings and strengthen self-improvement loop

- Make DevContainer host SSH bind mount read-only
- Add non-root pod and container securityContext to Valkey deployment
- Configure CPU and memory resource limits in values-ollama.yaml
- Implement deterministic AST syntax validation and template mitigation in verification.py
- Sanitize Rich console markup rendering in review report output and streaming tokens
- Clean up public tools export in ai.tools.__init__.py
- Update verify_finding.md and ROUTINE_TASKS.md with automated self-improvement and calibration loop

* feat(gpu): configure ollama and devcontainer to utilize all available GPUs on the node

* fix(k8s): support custom and remote cluster contexts in deploy-stack, teardown-stack, port-forward, and configure-urls

* fix(k8s): support iterative multi-resource adoption in helm upgrade loop

* feat(k8s): use native daemonset as primary ollama deployment for llm stack

* feat(modernization): adopt official qdrant-client SDK and pydantic-settings

* docs: update CHANGELOG.md and LOG.md with 0.1.12 features and modernization

* fix(review,security): harden persona review prompts, sanitize tool arguments, and fix review findings

* docs: update CHANGELOG.md and LOG.md with full 0.1.12 release notes

* feat(release): v0.1.12

* fix(tests): enable allow_private_network in test_rag_cli for CI environments

* feat(review): sort review findings by severity and confidence, consolidate cross-persona duplicates

* fix(review): normalize Unicode spaces, hyphens, and quotes in finding text

* feat(ai): add atomic review task steps, criteria validation, and security intelligence

* fix(review): differentiate persona slug from persona_title and store LLM thoughts in ai_scratchpad

* feat(ai): add agent memory with automatic size-triggered summarization

* docs: add comprehensive tool cheatsheets and command translation guides

* fix(security): exclude file extensions and ignore patterns from network reference extraction

* refactor(security): use standard libraries (mimetypes, ipaddress, urllib) for file and network endpoint validation

* feat(review): display external dependencies and network reference security status tables and clean internal finding metadata

* fix(review): parallelize threat intelligence lookups in stage 2 and set fast non-blocking client timeouts

* feat(k8s): display Jaeger UI and OTLP trace connection info on deploy-stack

* fix(k8s): bind port-forward to 0.0.0.0 and register Jaeger and Qdrant in devcontainer forwardPorts

* fix(review): eliminate Stage 2/6 payload initialization bottlenecks and false-positive domain lookups

* fix(review): isolate target repository files and prevent root workspace path collisions

* docs(agents): expand agent guidance on naming conventions, project structure, and target repository isolation

* fix(security): prevent Python function references and TOML headers from falsely matching as domains

* refactor(ai): enhance persona and review prompts for target-agnostic defect guidance

* feat(ai): expand MCP and agent tools with threat intel, jaeger tracing, and persona-specific tool selection

* fix(ai): ensure chat agent executes tool calls and synthesizes final response when model output is enclosed in reasoning tags

* feat(ai): add universal AI response fixer and formatter step with zero-loss content and tool recovery

* refactor(ai): replace fragile custom JSON heuristic parsing with standard json-repair library

* fix(ai): preserve thinking blocks in LLMResponse and prevent premature validation rejection for thinking models

* fix(ai): enforce immediate tool execution rules and intent recovery in pydantic agent loop

* fix(ai): validate tool parameters and eliminate stop-word argument hallucination

* fix(ai): ensure agent prompts for final user-facing answer instead of outputting internal thoughts

* feat(ai): add model prewarming to chat, add uv audit tool, and enable multi-turn tool chaining

* refactor(config): remove DEFAULT from CONST names and centralize all defaults in config/defaults.py

* fix(ai): prevent tool repetition loops and enforce natural language response over tool JSON

* docs: update documentation, changelog, and clean up k8s port-forward address parameter
@dan-petty dan-petty changed the title fix(security): resolve review findings, harden manifests, and calibrate verification loop New Title Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants