mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-08-28 05:25:25 +00:00
docs(taint): document per-language model files (#2809)
* docs(taint): document per-language model files * docs(taint): link language-specific model tests --------- Co-authored-by: Gergő Magyar <gergomagyar@icloud.com>
This commit is contained in:
parent
a6a8aa788c
commit
a857f4c5a6
3 changed files with 39 additions and 21 deletions
|
|
@ -148,13 +148,19 @@ finding is NOT proof of safety.
|
||||||
|
|
||||||
## Adding a source / sink / sanitizer
|
## Adding a source / sink / sanitizer
|
||||||
|
|
||||||
Edit the language model in `taint/typescript-model.ts` (registered via the
|
Taint models cover four `SupportedLanguages` ids across three files:
|
||||||
explicit `registerBuiltinTaintModels` seam, keyed by `SupportedLanguages`). The
|
TypeScript and JavaScript use `taint/typescript-model.ts`, Python uses
|
||||||
spec is hashable data (no functions). A sanitizer's `neutralizes` lists the
|
`taint/python-model.ts`, and Java uses `taint/java-model.ts`. Edit the model
|
||||||
EXACT sink kinds it defends — never a blanket kill. Add a fixture + assert the
|
for the language you are targeting. The explicit
|
||||||
finding (or its absence) in `test/unit/taint/` (real-source harness:
|
`registerBuiltinTaintModels` seam in `typescript-model.ts` registers all four;
|
||||||
`test/helpers/ts-cfg-harness.ts`); the end-to-end proof is
|
it is not an import side effect.
|
||||||
`test/integration/cfg/`.
|
|
||||||
|
The spec is hashable data (no functions). A sanitizer's `neutralizes` lists
|
||||||
|
the EXACT sink kinds it defends — never a blanket kill. Add a fixture + assert
|
||||||
|
the finding (or its absence) in `test/unit/taint/`. TypeScript and JavaScript
|
||||||
|
use the real-source harness `test/helpers/ts-cfg-harness.ts`; Python and Java
|
||||||
|
model matches are covered by `python-model-match.test.ts` and
|
||||||
|
`java-model-match.test.ts`. The end-to-end proof is `test/integration/cfg/`.
|
||||||
|
|
||||||
## Validation checklist for any `--pdg` change
|
## Validation checklist for any `--pdg` change
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,13 +148,19 @@ finding is NOT proof of safety.
|
||||||
|
|
||||||
## Adding a source / sink / sanitizer
|
## Adding a source / sink / sanitizer
|
||||||
|
|
||||||
Edit the language model in `taint/typescript-model.ts` (registered via the
|
Taint models cover four `SupportedLanguages` ids across three files:
|
||||||
explicit `registerBuiltinTaintModels` seam, keyed by `SupportedLanguages`). The
|
TypeScript and JavaScript use `taint/typescript-model.ts`, Python uses
|
||||||
spec is hashable data (no functions). A sanitizer's `neutralizes` lists the
|
`taint/python-model.ts`, and Java uses `taint/java-model.ts`. Edit the model
|
||||||
EXACT sink kinds it defends — never a blanket kill. Add a fixture + assert the
|
for the language you are targeting. The explicit
|
||||||
finding (or its absence) in `test/unit/taint/` (real-source harness:
|
`registerBuiltinTaintModels` seam in `typescript-model.ts` registers all four;
|
||||||
`test/helpers/ts-cfg-harness.ts`); the end-to-end proof is
|
it is not an import side effect.
|
||||||
`test/integration/cfg/`.
|
|
||||||
|
The spec is hashable data (no functions). A sanitizer's `neutralizes` lists
|
||||||
|
the EXACT sink kinds it defends — never a blanket kill. Add a fixture + assert
|
||||||
|
the finding (or its absence) in `test/unit/taint/`. TypeScript and JavaScript
|
||||||
|
use the real-source harness `test/helpers/ts-cfg-harness.ts`; Python and Java
|
||||||
|
model matches are covered by `python-model-match.test.ts` and
|
||||||
|
`java-model-match.test.ts`. The end-to-end proof is `test/integration/cfg/`.
|
||||||
|
|
||||||
## Validation checklist for any `--pdg` change
|
## Validation checklist for any `--pdg` change
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,13 +148,19 @@ finding is NOT proof of safety.
|
||||||
|
|
||||||
## Adding a source / sink / sanitizer
|
## Adding a source / sink / sanitizer
|
||||||
|
|
||||||
Edit the language model in `taint/typescript-model.ts` (registered via the
|
Taint models cover four `SupportedLanguages` ids across three files:
|
||||||
explicit `registerBuiltinTaintModels` seam, keyed by `SupportedLanguages`). The
|
TypeScript and JavaScript use `taint/typescript-model.ts`, Python uses
|
||||||
spec is hashable data (no functions). A sanitizer's `neutralizes` lists the
|
`taint/python-model.ts`, and Java uses `taint/java-model.ts`. Edit the model
|
||||||
EXACT sink kinds it defends — never a blanket kill. Add a fixture + assert the
|
for the language you are targeting. The explicit
|
||||||
finding (or its absence) in `test/unit/taint/` (real-source harness:
|
`registerBuiltinTaintModels` seam in `typescript-model.ts` registers all four;
|
||||||
`test/helpers/ts-cfg-harness.ts`); the end-to-end proof is
|
it is not an import side effect.
|
||||||
`test/integration/cfg/`.
|
|
||||||
|
The spec is hashable data (no functions). A sanitizer's `neutralizes` lists
|
||||||
|
the EXACT sink kinds it defends — never a blanket kill. Add a fixture + assert
|
||||||
|
the finding (or its absence) in `test/unit/taint/`. TypeScript and JavaScript
|
||||||
|
use the real-source harness `test/helpers/ts-cfg-harness.ts`; Python and Java
|
||||||
|
model matches are covered by `python-model-match.test.ts` and
|
||||||
|
`java-model-match.test.ts`. The end-to-end proof is `test/integration/cfg/`.
|
||||||
|
|
||||||
## Validation checklist for any `--pdg` change
|
## Validation checklist for any `--pdg` change
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue