Skip to content

C#: Document custom redaction barriers - #23201

Open
SkyCipherr wants to merge 1 commit into
github:mainfrom
SkyCipherr:codex/document-csharp-redaction-model
Open

SkyCipherr wants to merge 1 commit into
github:mainfrom
SkyCipherr:codex/document-csharp-redaction-model

Conversation

@SkyCipherr

Copy link
Copy Markdown
Contributor

Document how to model the return value of a custom C# redaction method for cs/exposure-of-sensitive-information. The query help now includes a barrierModel example using the file-content-store kind.

I rendered the query help as Markdown and loaded the YAML from the example into a model pack. On the same C# test database, the query reported both the raw write and the redacted write before loading the pack. With the pack loaded, only the raw write still alerted.

Fixes #23160.

@SkyCipherr
SkyCipherr requested a review from a team as a code owner November 23, 2026 05:35
Copilot AI adaptive review requested due to automatic review settings November 23, 2026 05:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review evidence identifies no active issues, and the change is limited to documenting custom redaction barrier modeling and its relevant CodeQL guidance.

No open issues 🎉

What changed in this PR

Documents how C# users can model custom redaction methods as barriers for cs/exposure-of-sensitive-information, preventing alerts on redacted values while preserving alerts for raw sensitive data.

Changes:

  • Adds a YAML barrierModel example targeting the file-content-store barrier kind.
  • Explains the ReturnValue access path and links to the C# library-model customization documentation.
File Description
csharp/​ql/​src/​Security Features/​CWE-359/​ExposureOfPrivateInformation.qhelp Documents custom redaction barrier modeling and provides a relevant CodeQL documentation link.

Review effort: Lite (adaptive)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C#: cs/exposure-of-sensitive-information has no documented way to mark a custom masking function as a sanitizer

2 participants