Skip to content

Potential fix for code scanning alert no. 5: Clear-text storage of sensitive information - #290

Open
Exohayvan wants to merge 1 commit into
mainfrom
alert-autofix-5
Open

Potential fix for code scanning alert no. 5: Clear-text storage of sensitive information#290
Exohayvan wants to merge 1 commit into
mainfrom
alert-autofix-5

Conversation

@Exohayvan

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/AetherMesh-AI/aethermesh-core/security/code-scanning/5

The best fix is to guarantee sensitive free-text fields are redacted before serialization, not only based on key names but also for known high-risk textual fields that can embed credentials (like error_summary). This keeps existing functionality (append JSONL audit records) while preventing secret literals from being stored.

In src/aethermesh_core/local_audit_event.py, update _sanitize_audit_value so that when a value is a string, it applies secret-text redaction first and then path sanitization consistently; and ensure known sensitive-content keys are fully redacted by key-name logic already present. This strengthens the sanitization boundary immediately before persistence without changing caller behavior or file format. No test file changes are required if existing tests already validate redaction behavior.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…nsitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Exohayvan
Exohayvan marked this pull request as ready for review July 23, 2026 02:07
@Exohayvan Exohayvan added type:bug Type: bug or broken behavior. priority:P1 Priority P1: critical/blocking work. system:runtime System: local node runtime/service lifecycle. area:audit-log Area: generated triage label for audit log. area:audit-logging Area: generated triage label for audit logging. risk:high Risk: changes critical working behavior or release/runtime paths. needs:review Needs: generated triage label for review. labels Jul 23, 2026
@Exohayvan Exohayvan added status:ready Human-readable workflow status: ready for the next review or merge step. status:in-review Human-readable workflow status: under review. status:blocked Human-readable workflow status: blocked by a failing gate or dependency. and removed needs:review Needs: generated triage label for review. status:ready Human-readable workflow status: ready for the next review or merge step. status:in-review Human-readable workflow status: under review. labels Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:audit-log Area: generated triage label for audit log. area:audit-logging Area: generated triage label for audit logging. priority:P1 Priority P1: critical/blocking work. risk:high Risk: changes critical working behavior or release/runtime paths. status:blocked Human-readable workflow status: blocked by a failing gate or dependency. system:runtime System: local node runtime/service lifecycle. type:bug Type: bug or broken behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant