Skip to content

Comments

security: Security Audit Report and Analysis#110

Open
kinder-world wants to merge 2 commits intomoltis-org:mainfrom
kinder-world:security/scan1
Open

security: Security Audit Report and Analysis#110
kinder-world wants to merge 2 commits intomoltis-org:mainfrom
kinder-world:security/scan1

Conversation

@kinder-world
Copy link

@kinder-world kinder-world commented Feb 13, 2026

I asked Opus to scan for security issues and make a report, so it generated this. I don't understand everything, but I think it can be a guide/plan for later fixes. I hope it helps.


Summary

Comprehensive security audit of Moltis covering authentication, sandbox isolation, SSRF protection, supply chain security, and data protection. The audit was conducted using parallel multi-agent analysis (code review, penetration testing, security auditing, and architecture review).

Key Findings:

  • 1 Critical: API key scopes defined but never enforced
  • 7 High: Including SSRF DNS rebinding, IPv6-mapped IPv4 bypass, Docker security hardening gaps
  • 16 Medium: Configuration and implementation gaps
  • 13 Low: Best practices improvements

This PR also includes dependency vulnerability scans (cargo audit and npm audit) and various feature improvements developed on this branch.

Security Audit Highlights

Critical Finding (C1)

API Key Scopes Never Enforced - has_scope() is defined but has zero call sites. Every API key grants full admin access regardless of assigned permissions (CWE-862, OWASP A01:2021).

High Findings Summary

  • H1: SSRF DNS rebinding vulnerability (TOCTOU race condition)
  • H2: IPv6-mapped IPv4 addresses bypass SSRF protection
  • H3: Docker containers lack security hardening (no cap-drop, no-new-privileges, etc.)
  • H4: No dependency vulnerability scanning in CI
  • H5: Data sovereignty compliance gaps for GDPR/CCPA
  • H6: No encryption at rest for sensitive data
  • H7: No rate limiting on authentication endpoints

Dependency Audit Results

  • Rust: 2 vulnerabilities, 5 unmaintained warnings
    • rsa 0.7.2 & 0.9.10: Marvin Attack (RUSTSEC-2023-0071) - no fix available
    • Several unmaintained transitive dependencies
  • npm: 0 vulnerabilities (clean)

Audit Artifacts

  • Full report: docs/plans/2026-02-13-security-audit-design.md
  • Includes STRIDE threat model, attack surface map, defense-in-depth scorecard
  • Prioritized remediation roadmap

Additional Features

This branch also includes these improvements:

  • Session sharing functionality with branded map link icons
  • Multi-select model picker with probe badges
  • Model filtering and per-model tool support
  • Live model discovery and preference merging
  • Immediate session preview updates

Validation

Completed

  • Security audit completed by 4 specialized agents
  • cargo audit executed and results documented
  • npm audit executed (0 vulnerabilities)
  • Zizmor resilient runner script added
  • just format-check passes
  • just release-preflight passes
  • All tests pass
  • E2E tests updated for new features

Remaining

  • Implement critical finding remediation (C1: API key scope enforcement)
  • Address high-severity findings (H1-H7)
  • Add cargo-deny to CI pipeline
  • Consider cargo-vet for supply chain verification

Manual QA

  • Verified security audit document is comprehensive and well-structured
  • Confirmed dependency audit results match actual cargo audit output
  • Tested session sharing flow works correctly
  • Verified model selection improvements function as expected

Files Changed

Security Documentation:

  • docs/plans/2026-02-13-security-audit-design.md - 373 lines of comprehensive security analysis

Scripts:

  • scripts/run-zizmor-resilient.sh - Resilient GitHub Actions security scanner

Features:

  • Session sharing implementation
  • Model selection improvements
  • WebSocket and UI enhancements

62 files changed, 7363 insertions(+), 1025 deletions(-)

Next Steps

After merging this audit:

  1. Create tracking issues for each critical and high finding
  2. Prioritize C1 (API key scopes) for immediate fix
  3. Implement H4 (cargo-deny in CI) as it's straightforward
  4. Address H1-H3 (SSRF and Docker hardening) in security hardening sprint

Note: This PR documents security findings but does not implement fixes. Remediation will be tracked in separate issues/PRs to ensure each fix is properly tested and reviewed.

Comprehensive security audit covering authentication, sandbox isolation,
SSRF, supply chain, and data protection. Produced by parallel multi-agent
analysis (code review, penetration testing, security auditing, architecture
review). 1 critical, 7 high, 16 medium, 13 low findings with prioritized
remediation roadmap. Includes STRIDE threat model, attack surface map,
defense-in-depth scorecard, and binary transparency assessment.
Add concrete dependency vulnerability data from cargo audit (2 vulns,
5 unmaintained warnings) and npm audit (0 vulns) to H4 finding.
Key issues: rsa Marvin Attack with no upstream fix (RUSTSEC-2023-0071),
phantom sqlx-mysql dependency pulling vulnerable rsa, and unmaintained
transitive deps in teloxide/async-openai/web-push chains.
@kinder-world kinder-world changed the title Security Audit Report and Analysis [Security] Security Audit Report and Analysis Feb 13, 2026
@kinder-world kinder-world changed the title [Security] Security Audit Report and Analysis security: Security Audit Report and Analysis Feb 13, 2026
@kinder-world
Copy link
Author

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.

2 participants