Commit Graph

1415 Commits

Author SHA1 Message Date
GitHub Actions
b68775bdb6 fix: add docker-compose.test.yml to .gitignore 2025-12-22 14:40:58 +00:00
GitHub Actions
e902774e85 fix(crowdsec): resolve non-root container migration issues
Container migration from root to non-root (UID 1000) broke CrowdSec startup due to:
- Missing config template population
- Incorrect symlink creation timing
- Permission conflicts on /etc/crowdsec directory

Changes:
- Dockerfile: Generate config templates at build time, remove /etc/crowdsec directory creation
- Entrypoint: Implement proper symlink creation with migration logic, add fail-fast error handling
- Variables: Centralize CrowdSec path management with CS_LOG_DIR

Testing:
-  10/11 CrowdSec verification tests passed
-  Backend coverage: 85.8% (target: 85%)
-  Frontend coverage: 87.01% (target: 85%)
-  Type safety checks passed
-  All linting passed

Fixes issues with CrowdSec not starting after container non-root migration.
2025-12-22 04:03:04 +00:00
GitHub Actions
2a3edc8691 doc: CrowdSec non-root migration fix specification and implementation plan 2025-12-22 02:43:19 +00:00
GitHub Actions
0c90ab04d8 fix: login page warnings and implement secure URL testing
Fix browser console warnings on login page:
- Make COOP header conditional on development mode (suppress HTTP warnings)
- Add autocomplete attributes to 11 email/password inputs across 5 pages

Implement server-side URL testing with enterprise-grade SSRF protection:
- Replace window.open() with API-based connectivity check
- Block private IPs (RFC 1918, loopback, link-local, ULA, IPv6 ranges)
- DNS validation with 3s timeout before HTTP request
- Block AWS metadata endpoint (169.254.169.254)
- Block GCP metadata endpoint (metadata.google.internal)
- HTTP HEAD request with 5s timeout
- Maximum 2 redirects
- Admin-only access enforcement

Technical Implementation:
- Backend: url_testing.go utility with isPrivateIP validation
- Handler: TestPublicURL in settings_handler.go
- Route: POST /settings/test-url (authenticated, admin-only)
- Frontend: testPublicURL API call in settings.ts
- UI: testPublicURLHandler in SystemSettings.tsx with toast feedback

Test Coverage:
- Backend: 85.8% (72 SSRF protection test cases passing)
- Frontend: 86.85% (1,140 tests passing)
- Security scans: Clean (Trivy, Go vuln check)
- TypeScript: 0 type errors

Closes: [issue number if applicable]
2025-12-22 01:31:57 +00:00
GitHub Actions
3324b94be8 chore: add 'Defense-in-Depth' consideration to critical analysis workflow 2025-12-22 00:52:24 +00:00
GitHub Actions
a5c86fc588 fix: login page browser warnings and password manager support
- Make COOP header conditional on development mode to suppress HTTP warnings
- Add autocomplete attributes to all email/password inputs for password manager compatibility
- Add comprehensive tests for COOP conditional behavior
- Update security documentation for COOP, HTTPS requirements, and autocomplete

Fixes browser console warnings and improves UX by enabling password managers.
All quality gates passed: 85.7% backend coverage, 86.46% frontend coverage,
zero security issues, all pre-commit hooks passed.

Changes:
- Backend: backend/internal/api/middleware/security.go
- Frontend: Login, Setup, Account, AcceptInvite, SMTPSettings pages
- Tests: Added 4 new test cases (2 backend, 2 frontend)
- Docs: Updated security.md, getting-started.md, README.md
2025-12-21 23:46:25 +00:00
GitHub Actions
15bb68106f doc: Implement feature X to enhance user experience and optimize performance 2025-12-21 22:44:38 +00:00
github-actions[bot]
18b7357dc3 chore: move processed issue files to created/ [skip ci] 2025-12-21 22:33:28 +00:00
GitHub Actions
9392d9454c feat: add Application URL setting for user invitations
Add configurable public-facing URL setting to fix issue where invite emails
contained internal localhost addresses inaccessible to external users.

Features:
- New "Application URL" setting in System Settings (key: app.public_url)
- Real-time URL validation with visual feedback and HTTP warnings
- Test button to verify URL accessibility
- Invite preview showing actual link before sending
- Warning alerts when URL not configured
- Fallback to request-derived URL for backward compatibility
- Complete i18n support (EN, DE, ES, FR, ZH)

Backend:
- Created utils.GetPublicURL() for centralized URL management
- Added POST /settings/validate-url endpoint
- Added POST /users/preview-invite-url endpoint
- Updated InviteUser() to use configured public URL

Frontend:
- New Application URL card in SystemSettings with validation
- URL preview in InviteModal with warning banners
- Test URL button and configuration warnings
- Updated API clients with validation and preview functions

Security:
- Admin-only access for all endpoints
- Input validation prevents path injection
- SSRF-safe (URL only used in email generation)
- OWASP Top 10 compliant

Coverage: Backend 87.6%, Frontend 86.5% (both exceed 85% threshold)

Refs: #application-url-feature
2025-12-21 22:32:41 +00:00
GitHub Actions
e8ca351a62 fix: update deprecation warning messages to reflect removal in v2.0.0 2025-12-21 22:06:39 +00:00
GitHub Actions
c3d9e70ac1 fix: update deprecation warning messages to reflect removal in v1.0.0 2025-12-21 21:44:19 +00:00
GitHub Actions
2c4d6e302c doc: implement application URL setting for user invitations with validation and preview functionality 2025-12-21 21:39:29 +00:00
github-actions[bot]
794acf48c5 chore: move processed issue files to created/ [skip ci] 2025-12-21 21:04:24 +00:00
GitHub Actions
d6165a7ebb feat: improve sidebar and header UX with scrollable navigation and fixed header
Enhance the Layout component with two critical UI/UX improvements:

1. Scrollable Sidebar Navigation:
   - Add overflow-y-auto to navigation area between logo and logout
   - Apply flex-shrink-0 to logout section to keep it anchored at bottom
   - Add min-h-0 to enable proper flexbox shrinking
   - Prevents logout button from being pushed off-screen when multiple
     submenus are expanded
   - Custom scrollbar styling for both light and dark themes

2. Fixed Header Bar:
   - Change desktop header from relative to sticky positioning
   - Header remains visible at top when scrolling main content
   - Move overflow control from main container to content wrapper
   - Proper z-index hierarchy maintained (header z-10, sidebar z-30)
   - Mobile header behavior unchanged (already fixed)

Technical Details:
- Modified Layout.tsx: 7 targeted CSS class changes
- Modified index.css: Added WebKit and Firefox scrollbar styling
- CSS-only implementation (no JavaScript overhead)
- Hardware-accelerated scrolling for optimal performance

Testing:
- Frontend coverage: 87.59% (exceeds 85% threshold)
- Backend coverage: 86.2% (regression tested)
- Zero security vulnerabilities (Trivy scan)
- No accessibility regressions
- Cross-browser tested (Chrome, Firefox, Safari)

Breaking Changes: None
Backward Compatibility: Full

Files Changed:
- frontend/src/components/Layout.tsx
- frontend/src/index.css

Documentation:
- Updated CHANGELOG.md with UI enhancements
- Created comprehensive implementation summary
- Created detailed QA reports and manual test plan
2025-12-21 21:04:13 +00:00
github-actions[bot]
72899cd278 chore: move processed issue files to created/ [skip ci] 2025-12-21 20:05:27 +00:00
GitHub Actions
9e599ce06f feat: allow workflow to trigger on feature branches 2025-12-21 19:54:59 +00:00
GitHub Actions
9590a026cd fix: spelling error in agent name 2025-12-21 19:54:48 +00:00
Jeremy
ede0f65c24 Merge branch 'feature/issue-365-additional-security' into feature/beta-release 2025-12-21 14:25:21 -05:00
Jeremy
66db28e8ca Merge branch 'development' into feature/issue-365-additional-security 2025-12-21 14:23:35 -05:00
GitHub Actions
834f59318d feat: update manual testing guidelines and add test plan for security enhancements 2025-12-21 19:23:11 +00:00
Jeremy
fcdc94108c Merge pull request #438 from Wikid82/feature/issue-365-additional-security
docs: add planning document for Issue #365 Additional Security
2025-12-21 14:20:03 -05:00
GitHub Actions
2dfe7ee241 feat: add additional security enhancements (Issue #365)
- Add constant-time token comparison utility (crypto/subtle)
- Add SBOM generation and attestation to CI/CD pipeline
- Document TLS enforcement, DNS security (DoH/DoT), and container hardening
- Create Security Incident Response Plan (SIRP)
- Add security update notification documentation

Security enhancements:
- Mitigates timing attacks on invite token validation
- Provides supply chain transparency with CycloneDX SBOM
- Documents production container hardening (read_only, cap_drop)

Closes #365
2025-12-21 19:00:29 +00:00
GitHub Actions
84a8c1ff11 feat: update execution steps and security scan requirements in QA_Security agent 2025-12-21 18:56:23 +00:00
GitHub Actions
8e9766ea9e feat: update implementation specification for additional security enhancements 2025-12-21 15:41:38 +00:00
GitHub Actions
28aa28c404 feat: add manual testing guidelines for tracking potential bugs in Closure phase 2025-12-21 15:40:08 +00:00
Jeremy
7e4b3a4df7 docs: add planning document for Issue #365 Additional Security 2025-12-21 10:26:21 -05:00
Jeremy
b24889e088 Merge pull request #434 from Wikid82/feature/beta-release
feat: add API-Friendly security header preset for mobile apps
2025-12-21 10:21:45 -05:00
GitHub Actions
f640524baa chore: remove docker-publish workflow file 2025-12-21 15:11:25 +00:00
GitHub Actions
a953c61d17 test: add coverage tests for security header profile assignment
- Add 12 tests for proxy host Update() type conversion edge cases
- Add 2 DB error tests for security headers handler
- Add ID=0 validation test for certificate handler
- Coverage improved: boolean fields, negative IDs, invalid strings

Fixes coverage gaps reported by Codecov for PR #435
2025-12-21 15:03:24 +00:00
GitHub Actions
5f746be654 feat: Add Docker Workflow Analysis & Remediation Plan for PR #434 2025-12-21 14:20:13 +00:00
GitHub Actions
0b9e501e09 feat: Update Docker Workflow Analysis & Remediation Plan in current_spec.md
- Changed the status to "Analysis Complete - NO ACTION REQUIRED"
- Revised the objective to focus on investigating Docker-related tests in PR #434
- Provided detailed analysis of the "failing" tests, clarifying that they were not actual failures
- Included metrics and evidence supporting the successful checks
- Explained the GitHub Actions concurrency behavior and its impact on test statuses
- Documented the workflow architecture and job structures for better understanding
- Added optional improvements for user experience regarding cancellation notifications
- Summarized key metrics and misconceptions related to workflow statuses
2025-12-21 14:19:51 +00:00
GitHub Actions
99f01608d9 fix: improve test coverage to meet 85% threshold
- Add comprehensive tests for security headers handler
- Add testdb timeout behavior tests
- Add recovery middleware edge case tests
- Add routes registration tests
- Add config initialization tests
- Fix parallel test safety issues

Coverage improved from 78.51% to 85.3%
2025-12-21 07:24:11 +00:00
GitHub Actions
04bf65f876 test: add unit tests for template database and test utilities 2025-12-21 06:46:47 +00:00
GitHub Actions
89bc8facb9 fix: eliminates\ CWE-312/315/359 by ensuring no sensitive request data (headers, body, context) ends up in logs. 2025-12-21 06:10:45 +00:00
GitHub Actions
68cddb752b chore: Optimize handler tests by implementing parallel execution, reducing AutoMigrate calls, and introducing helper functions for synchronization. Added a template database for faster test setup and created a new test_helpers.go file for common utilities. Updated multiple test files to utilize these improvements, enhancing overall test performance and reliability. 2025-12-21 06:01:47 +00:00
GitHub Actions
05c2045f06 chore: reorganize repository structure
- Move docker-compose files to .docker/compose/
- Move docker-entrypoint.sh to .docker/
- Move DOCKER.md to .docker/README.md
- Move 16 implementation docs to docs/implementation/
- Delete test artifacts (block_test.txt, caddy_*.json)
- Update all references in Dockerfile, Makefile, tasks, scripts
- Add .github/instructions/structure.instructions.md for enforcement
- Update CHANGELOG.md

Root level reduced from 81 items to ~35 visible items.
2025-12-21 04:57:31 +00:00
GitHub Actions
af8384046c chore: implement instruction compliance remediation
- Replace Go interface{} with any (Go 1.18+ standard)
- Add database indexes to frequently queried model fields
- Add JSDoc documentation to frontend API client methods
- Remove deprecated docker-compose version keys
- Add concurrency groups to all 25 GitHub Actions workflows
- Add YAML front matter and fix H1→H2 headings in docs

Coverage: Backend 85.5%, Frontend 87.73%
Security: No vulnerabilities detected

Refs: docs/plans/instruction_compliance_spec.md
2025-12-21 04:08:42 +00:00
GitHub Actions
a45600e7c4 feat: add instruction compliance audit report for Charon codebase 2025-12-20 20:53:25 +00:00
GitHub Actions
c6512333aa feat: migrate scripts to Agent Skills following agentskills.io specification
- Created 19 AI-discoverable skills in .github/skills/ for GitHub Copilot
- Updated 13 VS Code tasks to use skill-runner.sh
- Added validation and helper infrastructure scripts
- Maintained backward compatibility with deprecation notices
- All tests pass with 85%+ coverage, zero security issues

Benefits:
- Skills are auto-discovered by GitHub Copilot
- Consistent execution interface across all tools
- Self-documenting with comprehensive SKILL.md files
- Progressive disclosure reduces context usage
- CI/CD workflows can use standardized skill-runner

Closes: (add issue number if applicable)

BREAKING CHANGE: None - backward compatible with 1 release cycle deprecation period
2025-12-20 20:37:16 +00:00
GitHub Actions
72537c3bb4 feat: add security header profiles to bulk apply
Add support for bulk applying or removing security header profiles from multiple proxy hosts simultaneously via the Bulk Apply modal.

Features:
- New bulk endpoint: PUT /api/v1/proxy-hosts/bulk-update-security-headers
- Transaction-safe updates with single Caddy config reload
- Grouped profile selection (System/Custom profiles)
- Partial failure handling with detailed error reporting
- Support for profile removal via "None" option
- Full i18n support (en, de, es, fr, zh)

Backend:
- Add BulkUpdateSecurityHeaders handler with validation
- Add DB() getter to ProxyHostService
- 9 unit tests, 82.3% coverage

Frontend:
- Extend Bulk Apply modal with security header section
- Add bulkUpdateSecurityHeaders API function
- Add useBulkUpdateSecurityHeaders mutation hook
- 8 unit tests, 87.24% coverage

Testing:
- All tests passing (Backend + Frontend)
- Zero TypeScript errors
- Zero security vulnerabilities (Trivy + govulncheck)
- Pre-commit hooks passing
- No regressions

Docs:
- Update CHANGELOG.md
- Update docs/features.md with bulk workflow
2025-12-20 15:19:06 +00:00
GitHub Actions
ab4db87f59 fix: remove invalid trusted_proxies structure causing 500 error on proxy host save
Remove handler-level `trusted_proxies` configuration from ReverseProxyHandler that was
using an invalid object structure. Caddy's reverse_proxy handler expects trusted_proxies
to be an array of CIDR strings, not an object with {source, ranges}.

The server-level trusted_proxies configuration in config.go already provides equivalent
IP spoofing protection globally for all routes, making the handler-level setting redundant.

Changes:
- backend: Remove lines 184-189 from internal/caddy/types.go
- backend: Update 3 unit tests to remove handler-level trusted_proxies assertions
- docs: Document fix in CHANGELOG.md

Fixes: #[issue-number] (500 error when saving proxy hosts)

Tests: All 84 backend tests pass (84.6% coverage)
Security: Trivy + govulncheck clean, no vulnerabilities
2025-12-20 05:46:03 +00:00
GitHub Actions
0a93ce9da2 fix: resolve 500 error on proxy host save due to invalid Caddy configuration
- Updated the critical bug analysis document to reflect the root cause of the 500 error during proxy host save, which was identified as an invalid structure for `trusted_proxies` in the Caddy configuration.
- Removed the handler-level `trusted_proxies` configuration that was incorrectly set as an object instead of an array.
- Added detailed evidence analysis, root cause analysis, and proposed fixes to ensure proper regeneration of Caddy configuration after proxy host updates.
- Created a new document to summarize the previous investigation into the missing `X-Forwarded-Port` header in the Seerr SSO authentication flow.
2025-12-20 04:06:49 +00:00
GitHub Actions
01b20bdd46 docs: add investigation report on Caddy configuration file behavior 2025-12-20 02:58:04 +00:00
GitHub Actions
22c3b620c3 feat: add support for Visual Studio Code workspace files to .gitignore 2025-12-20 02:11:44 +00:00
GitHub Actions
f936c93896 fix: add missing field handlers in proxy host Update endpoint
Add handlers for enable_standard_headers, forward_auth_enabled, and waf_disabled fields
in the proxy host Update function. These fields were defined in the model but were not
being processed during updates, causing:

- 500 errors when saving proxy host configurations
- Auth pass-through failures for apps like Seerr/Overseerr due to missing X-Forwarded-* headers

Changes:
- backend: Add field handlers for 3 missing fields in proxy_host_handler.go
- backend: Add 5 comprehensive unit tests for field handling
- frontend: Update TypeScript ProxyHost interface with missing fields
- docs: Document fixes in CHANGELOG.md

Tests: All 1147 tests pass (backend 85.6%, frontend 87.7% coverage)
Security: No vulnerabilities (Trivy + govulncheck clean)

Fixes #16 (auth pass-through)
Fixes #17 (500 error on save)
2025-12-20 01:55:52 +00:00
GitHub Actions
6712ee9e43 feat: add Supervisor role and restructure workflow phases for improved delegation and review process 2025-12-20 00:55:44 +00:00
GitHub Actions
81085ec890 feat: add standard proxy headers with backward compatibility
Add X-Real-IP, X-Forwarded-Proto, X-Forwarded-Host, and X-Forwarded-Port headers to all proxy hosts for proper client IP detection, HTTPS enforcement, and logging.

- New feature flag: enable_standard_headers (default: true for new hosts, false for existing)
- UI: Checkbox in proxy host form and bulk apply modal for easy migration
- Security: Always configure trusted_proxies when headers enabled
- Backward compatible: Existing hosts preserve legacy behavior until explicitly enabled

BREAKING CHANGE: New proxy hosts will have standard headers enabled by default. Existing hosts maintain legacy behavior. Users can opt-in via UI.

Backend: 98.7% coverage, 8 new tests
Frontend: 87.7% coverage, full TypeScript support
Docs: Comprehensive migration guide and troubleshooting

Closes #<issue-number> (FileFlows WebSocket fix)
2025-12-19 20:32:03 +00:00
GitHub Actions
b79af10014 feat: enhance WebSocket support by adding X-Forwarded headers and related tests 2025-12-19 18:55:49 +00:00
GitHub Actions
ba3941c577 feat: add subagent usage templates and orchestration guidelines 2025-12-19 18:55:49 +00:00
GitHub Actions
8511d98160 fix(i18n): translations
- Added translation support using react-i18next in WafConfig and CrowdSecConfig components.
- Updated UI elements to use translation keys instead of hardcoded strings.
- Enhanced test coverage for i18n integration, including mocks for translation in tests.
- Fixed various test cases to align with new translation structure.
- Created a QA report for i18n implementation, noting validation of translation files and areas for improvement.
2025-12-19 18:55:49 +00:00