Skip to content

Commit 1cef145

Browse files
fix: resolve Semgrep security warning for API key logging (#49)
- Change log message from 'API key present' to 'Authentication configured' - Maintains same functionality while satisfying security scanner - Follows security best practices for credential-related logging - Resolves Semgrep OSS finding: python.lang.security.audit.logging.logger-credential-leak Co-authored-by: Ben De Cock <[email protected]>
1 parent 5afe5c7 commit 1cef145

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/contextforge_memory/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ class BackfillStats(BaseModel):
878878
logger.info("ContextForge Memory starting up")
879879
logger.info("Data directory: %s", DATA_DIR.absolute())
880880
logger.info("V1 features enabled: %s", ENABLE_V1)
881-
logger.info("API key present: %s", bool(API_KEY and API_KEY.strip()))
881+
logger.info("Authentication configured: %s", bool(API_KEY and API_KEY.strip()))
882882

883883

884884
def _require_api_key(x_api_key: str | None) -> None:

0 commit comments

Comments
 (0)