mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 14:17:11 +00:00
fix(security): harden API endpoints and resolve PR #674 review findings
- Fix X-Forwarded-For header spoofing in requireSensitiveLocalAccess (use socket-level address only) - Add model ID length validation (max 256 chars) in PUT /models/:provider - Add provider name validation (alphanumeric, max 64 chars) to prevent path traversal - Add stale entry eviction for unbounded quotaRateLimits Map (>1000 entries) - Fix concurrent refresh race in usage aggregator (wait for in-flight before forced refresh) - Sanitize internal URLs/paths from OAuth failure diagnostics - Add ValidationError class for denylist violations (distinct from system errors) - Make CLIProxy sync interval configurable via CCS_CLIPROXY_SYNC_INTERVAL env var - Improve legacy continuity config error logging (unconditional warn) - Add CACHE_VERSION history comments
This commit is contained in:
1 parent
2651e17412
commit
a4c5bb7421
9 files changed
+76
-22
No files matched your search
@@ -52,13 +52,11 @@ function loadLegacyContinuityInheritanceMap(): Record<string, string> {
|
||||
|
||||
return normalized;
|
||||
} catch (error) {
|
||||
if (process.env.CCS_DEBUG) {
|
||||
console.error(
|
||||
warn(
|
||||
`Failed to parse legacy continuity mapping at "${configJsonPath}": ${(error as Error).message}`
|
||||
)
|
||||
);
|
||||
}
|
||||
console.error(
|
||||
warn(
|
||||
`Failed to parse legacy continuity mapping at "${configJsonPath}": ${(error as Error).message}`
|
||||
)
|
||||
);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user