Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f6b7aea
Rust: Add prototype query.
geoffw0 Nov 11, 2025
f8ef48b
Rust: Add query test.
geoffw0 Nov 11, 2025
209f394
Rust: Fix the alert message.
geoffw0 Nov 11, 2025
c77eef3
Rust: Convert the query to a path-problem with global data flow.
geoffw0 Nov 11, 2025
bb78fdf
Rust: Add qhelp and examples (translated from Go, by Copilot).
geoffw0 Nov 12, 2025
87d66c6
Rust: Clean up the .qhelp a little.
geoffw0 Nov 12, 2025
dcae0ef
Rust: I prefer the original certificates reference from the Go .qhelp.
geoffw0 Nov 12, 2025
49063ac
Rust: Cut down the example for readability.
geoffw0 Nov 12, 2025
7a62642
Rust: Change note.
geoffw0 Nov 12, 2025
0675a29
Rust: Minor corrections.
geoffw0 Nov 12, 2025
42aca4a
Apply suggestions from code review
geoffw0 Nov 13, 2025
15fa99a
Rust: Clarify some confusing text in the .qhelp.
geoffw0 Nov 13, 2025
12cbb64
Rust: Add query to suite .expected lists.
geoffw0 Nov 13, 2025
e43000f
Rust: Correct ordering in query suite .expected lists.
geoffw0 Nov 13, 2025
2da0814
Rust: Add test case involving taint.
geoffw0 Nov 20, 2025
8145264
Rust: Add threat model sources as additional sources for the query.
geoffw0 Nov 20, 2025
aca7877
Rust: Add some missing path / file metadata models.
geoffw0 Nov 21, 2025
89a9c46
Rust: Second change note.
geoffw0 Nov 21, 2025
785754e
Rust: Switch the query to taint flow, since some taint summaries are …
geoffw0 Nov 21, 2025
ace7a77
Rust: Switch to MaD models.
geoffw0 Nov 21, 2025
3ad014b
Rust: Additional sinks found in MRVA-1000.
geoffw0 Nov 21, 2025
e01c871
Rust: Accept changes to the dataflow/sources/file test.
geoffw0 Nov 21, 2025
8061505
Merge remote-tracking branch 'upstream/main' into cert-checks
geoffw0 Nov 21, 2025
2ce4c47
Rust: More sinks from the MRVA-1000.
geoffw0 Nov 21, 2025
eb674d0
Rust: Reinstate the original function names model but call it a heuri…
geoffw0 Nov 21, 2025
ff8032a
Rust: Fix after merge.
geoffw0 Nov 21, 2025
0ea28b4
Rust: Test .expected changes.
geoffw0 Nov 21, 2025
993154e
Rust: Avoid duplicating sinks.
geoffw0 Nov 21, 2025
b62968f
Rust: Spelling.
geoffw0 Nov 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions rust/ql/lib/codeql/rust/frameworks/attohttpc.model.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,17 @@ module DisabledCertificateCheckExtensions {
private class ModelsAsDataSink extends Sink {
ModelsAsDataSink() { sinkNode(this, "disable-certificate") }
}

/**
* A heuristic sink for disabled certificate check vulnerabilities based on function names.
*/
private class HeuristicSink extends Sink {
HeuristicSink() {
exists(CallExprBase fc |
fc.getStaticTarget().(Function).getName().getText() =
["danger_accept_invalid_certs", "danger_accept_invalid_hostnames"] and
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.

Do we need this because there are some functions with these names that where not covered by the MaD? Or is it just to avoid enumerating all the variants of these methods?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We could enumerate all the variants of these methods that we find in the MRVA-1000, but:

  • there are quite a lot and it would be somewhat messy to enumerate.
  • also judging by the rare variants we found there, its likely there are even rarer variants that we would miss with a strictly models-as-data approach. There's no way to find them all.

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.

Thanks! Also, I see now that you had already explained this in other comments — I missed those when I asked the above 😅

fc.getArg(0) = this.asExpr()
)
}
}
}
Loading