Fix the audit's weak spots: injection and hardcoded-value considers, TLS and escape reviews - #28
Merged
Merged
Conversation
…an hold A consider that says "a caller passing outside input would make it exploitable" is asked, with the functions that call it, what the values it places can hold: text the program fixes, values it creates or a local tool's own arguments make it a note; text another party can set, or callers not shown, keep it. The recheck's origin question answered "the function's parameters" at 0.9 even when every caller passed a literal. Labeled such considers went from 30 right and 51 wrong to 30 and 32.
…lue what it is The Choice that names a finding's value lists, with each value, the other lines of its file that write it. A consider that rests only on a value's name, whose file writes that value again, is then asked what the value is: copies that must change together, or a value nothing explains, keep it; a value its field, argument or comment explains, an idiom or a hand-tuned number, clearly chosen, make it a note. Labeled such considers went from 53 right and 77 wrong to 32 right and 28 wrong.
…i18next's escaping in React Asked whether code turns certificate verification off, Online Boutique's gRPC clients with insecure credentials, telemetry exporters and a database behind the AlloyDB connector were seven reviews whatever the check's examples said. The TLS check now asks whether code accepts a server's certificate, host key or host name without verifying it: a connection without TLS presents nothing, and verification skipped only when a caller or the operator asks is not turned off. The escape check names i18next's escapeValue: false in a React app as escaping kept. Labeled unsafe-settings reviews went from 54 right and 24 wrong to 54 and 14.
A hardcoded-value review or consider that rests only on a value changing between environments is asked, once its value or constant is named and with the code that uses it, where the value would differ: each installation or the author's own account keeps it; the same value in every copy on purpose, a fallback used only when configuration gives none, or code no deployment runs, at 0.80, make it a note. The Choice that names a file's constant lists the lines that use each one. Labeled such findings went from 17 right and 36 wrong to 15 right and 19 wrong.
A path check left undecided after its trace and recheck is asked, with the functions that call it, where the paths come from: the program's own directories or configuration, the command line or settings of the person running a local program, a whole path its caller gives, or another party's input. The program's own or the local user's clear it: 74 units on the corpus, for about $0.02.
Parameters in a path, URL or redirect were a note once a check found them, but stayed uncertain while the check was undecided. Once the Choice that settles the check was asked and does not lean toward another party's input, such a unit is a note naming the path, URL or redirect: 450 injection units had stayed uncertain that way.
A test whose hollow checks stay undecided once its recheck is asked is clear when they lean below 0.50. Labeled from the code, 4 of 43 such tests below 0.50 were hollow, against 10 of 35 above; undecided tests on the corpus went from 792 to 156, with nothing asked again.
Undecided units on the corpus went from 1.39% to 0.83% of judged units with these changes and the environment Choice before them; no review or consider changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #26 and #27. The audit left four weak spots in findings people read:
Each gets a follow-up asked only for such findings, or a reworded check.
What changes
sslmode=disable) presents nothing to verify.escapeValue: falsein a React app as escaping kept.Results
Labeled findings on the tuned and fresh projects (not held out), main → this branch:
Review notes
sslmodetodisablefor remote servers was a right review and is now a note. It drops TLS rather than verification, which the finding's message misdescribed.asked_checksinsrc/units/security.rs("mixes separate jobs"). That function is unchanged here, and this branch's rules don't flag it.