Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

Shared: Treat trusted_schema names as non-sensitive - #22962

Open
LucaCappelletti94 wants to merge 2 commits into
github:mainfrom
LucaCappelletti94:upstream/trusted-schema-not-secret
Open

LucaCappelletti94 wants to merge 2 commits into
github:mainfrom
LucaCappelletti94:upstream/trusted-schema-not-secret

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

The secret-name heuristic in SensitiveDataHeuristics.qll matches any name containing trusted, so set_trusted_schema counts as a source of secret data. That name is SQLite's trusted_schema switch (PRAGMA trusted_schema, SQLITE_DBCONFIG_TRUSTED_SCHEMA), a hardening flag that carries no secret. Diesel exposes it as SqliteConnection::set_trusted_schema, and rust/cleartext-logging reports any formatting of its result as cleartext logging of sensitive information.

The regular expression already excludes trusted_iter with a lookahead, so this extends that lookahead to _?schema. Both the snake case and camel case spellings become non-sensitive, while names such as trusted_token stay secret.

Copilot AI auto review requested due to automatic review settings October 30, 2026 16:08
@LucaCappelletti94
LucaCappelletti94 requested review from a team as code owners October 30, 2026 16:08

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.

🟡 Changes recommended

An active moderate finding remains because the Go change note incorrectly claims that set_trusted_schema will not be classified as sensitive, while the Go queries use their own heuristic.

1 open issue
What changed in this PR

This pull request updates the shared sensitive-data heuristic so SQLite’s trusted_schema and trustedSchema names are not classified as secrets, reducing false positives in affected queries.

Changes:

  • Excludes trusted-schema names from the shared secret-name heuristic.
  • Adds Rust regression coverage for schema names, the setter method, and trusted_token.
  • Adds language-specific analysis change notes.
File Summary
swift/​ql/​lib/​change-notes/​2026-10-30-trusted-schema-not-sensitive.md Documents the Swift analysis improvement.
shared/​concepts/​codeql/​concepts/​internal/​SensitiveDataHeuristics.qll Excludes trusted-schema names from secret detection.
rust/​ql/​test/​library-tests/​sensitivedata/​test.rs Covers snake_case, camelCase, setter-method behavior, and continued detection of trusted_token.
rust/​ql/​lib/​change-notes/​2026-10-30-trusted-schema-not-sensitive.md Documents the Rust analysis improvement.
ruby/​ql/​lib/​change-notes/​2026-10-30-trusted-schema-not-sensitive.md Documents the Ruby analysis improvement.
python/​ql/​lib/​change-notes/​2026-10-30-trusted-schema-not-sensitive.md Documents the Python analysis improvement.
javascript/​ql/​lib/​change-notes/​2026-10-30-trusted-schema-not-sensitive.md Documents the JavaScript analysis improvement.
go/​ql/​lib/​change-notes/​2026-10-30-trusted-schema-not-sensitive.md Documents a claimed Go analysis improvement; review identified that Go uses a separate unchanged heuristic.

This pull request requires changes.

Review effort: Lite (auto)

---
category: minorAnalysis
---
* The sensitive data heuristics treat names built on `trusted_schema`, such as SQLite's `set_trusted_schema` setting, as non-sensitive. This removes false positive results from queries that use the sensitive data library (for example `go/clear-text-logging`).

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.

This is correct: most languages use this shared library, but not Go, so it shouldn't have a change note.

@github-actions github-actions Bot removed the Go label Oct 30, 2026

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.

3 participants