fix(sc): restrict CORS wildcard and add server idle timeout#75
fix(sc): restrict CORS wildcard and add server idle timeout#75theautoroboto wants to merge 1 commit into
Conversation
FedRAMP SC-08 requires transmission confidentiality and integrity
controls. A wildcard CORS AllowedOrigins ("*") allows any browser
origin to read API responses, bypassing same-origin protection.
Changes:
- config.go: add ServerConfig.AllowedOrigins []string field with
an empty default and doc comment explaining the FedRAMP constraint
- server.go: use cfg.Server.AllowedOrigins instead of hardcoded
wildcard; log a warning when the list is empty so operators know
they must set --allowed-origins before serving browser clients
- server.go: add IdleTimeout: 120s to the API http.Server to satisfy
AC-12 session termination requirements for keep-alive connections
Jira: ROSAENG-387, ROSAENG-389
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: theautoroboto The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
FedRAMP Remediation — SC-08 / AC-12: Transmission Confidentiality and Session Termination
Jira: ROSAENG-387, ROSAENG-389
Epic: ROSAENG-249
Finding
pkg/server/server.gouses a hardcoded"*"CORS wildcard, allowing any origin — failing SC-08 (transmission protection). NoIdleTimeoutis configured on the HTTP server, failing AC-12 (session termination).Change
pkg/config/config.go— addedAllowedOrigins []stringtoServerConfigpkg/server/server.go— replaced hardcoded"*"withcfg.Server.AllowedOrigins; operator warning log when list is empty; addedIdleTimeout: 120 * time.Secondto the HTTP serverReferences
🤖 Generated by fedramp-compliance agent on 2026-04-22