GitHub Security Scanner Exposed: Missing CORS Policy Validation Despite Documentation Promise
A critical gap exists in a security scanner's advertised capabilities. The tool's `scan` command documentation explicitly promises "CORS policy validation," but an analysis of the source code reveals this functionality is completely unimplemented. The scanner currently checks for seven standard security headers but contains zero logic to analyze Cross-Origin Resource Sharing (CORS) headers, leaving users with a false sense of security regarding a common attack vector.
The discrepancy is documented in the codebase. Line 47 of `internal/commands/scan.go` makes the promise, while the core scanning logic in `pkg/scanner/headers.go` shows a `securityHeaders` slice containing only seven items, with no CORS-related checks. This creates a direct mismatch between marketed features and delivered security analysis. The oversight is significant because CORS misconfigurations are a well-known vulnerability class that can lead to unauthorized cross-origin data access, exacerbate CSRF risks, and cause information leakage to malicious domains.
The issue aligns with the project's stated roadmap focus on "passive analysis" and safe testing, as CORS validation requires only header inspection. The codebase already contains patterns, like the `analyzeCookies()` method, that could be followed to implement the missing feature. This exposes a risk where developers and security teams relying on the tool's documentation may unknowingly deploy applications with dangerous CORS misconfigurations, believing they have been validated.