create-dataflow-model
Skill172 starsChanged 2 months agoApache-2.0View on GitHub
Model a method's taint propagation as code-based dataflow model and refine it against a test project until the sample passes. Use for a dropped method that requires code-based model
In this repository15 other files it gives its agents.
- analyze-external-methodsSkill
- analyze-findingsSkill
- appsec-agentSkill
- assemble-lib-rulesSkill
- build-projectSkill
- create-pass-through-modelSkill
- create-ruleSkill
- create-test-projectSkill
- debug-ruleSkill
- discover-attack-surfaceSkill
- generate-pocSkill
- orchestrate-stageSkill
- report-analyzer-issueSkill
- run-scanSkill
- triage-dependenciesSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 82
Verify only with the model test on the test project
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Create Dataflow Model
A dataflow model is code that expresses how data moves through a method the analyzer can't trace through — an opaque call where the engine loses taint because it can't see the body. You write a small stand-in that reproduces the method's real propagation from its inputs to its outputs, so the analyzer can follow taint through it. Run it against the prepared test project and refine until the sample passes.
Inputs
Provided by the caller, fall back to the default value when omitted. Ask back only when a required input is missing and has no sensible default
project-root(optional) — root of the target project. Opentaint keeps all analysis artifacts under the fixed<project-root>/.opentaint/directory, so every.opentaint/...path below resolves there. Default: current directorylanguage(required) — target language for this project and language-specific instructionsbatch(required) — the batch whose.opentaint/tracking/models/<batch>.yamlprovides thedataflowmethods to model and holds tracking statemethods(optional) — a specific subset of the batch's dataflow methods to (re)model; default all not yet inbuild.done
Workflow
1. Understand the propagation
Find and read each dataflow method's real source: take methods not yet in build.done, or the specific methods handed for repair even when already built. Leave built methods outside that explicit subset and their model source unchanged. An app-internal method sits in the project's own sources, a library method's source comes from its dependency (the language reference has how to get it). Read it to see how data moves from the method's inputs (receiver, arguments) to its outputs (return value, arguments it writes into, state it stores), gathering the full context needed to understand the function's behavior.
2. Write the model
Reproduce that propagation in the language-specific code form in the batch's model project at .opentaint/dataflow/<batch> — scaffold it if it doesn't exist yet — following the language reference's artifact layout. Cover every assigned callable variant, repair an explicitly handed callable in the existing source, and add new ones there rather than rewriting the file. The engine is field-sensitive — taint is tracked per field — so route data field-to-field exactly as the source does rather than tainting the whole object. The test project's negative samples (if present) verify this by storing taint in one field and reading another, so an over-broad model makes them fire. The concrete constructs and patterns are in the language reference.
3. Test against the test project
Run the model test directly as a foreground, blocking command and wait for exit — never background it or use Monitor. Apply this batch's sources and iterate until the samples pass. Feedback loop: a failing sample might be caused by the model's target type/member or signature not matching what the analyzer sees, or by the body not routing taint from the real source to the modeled output — diagnose the mismatch, fix, and re-run, don't rationalize a non-result. When the cause isn't obvious, localize where taint dies with a fact-reachability trace before guessing further per references/debugging.md. On a pass, append the method only if it is not already present in build.done (per Tracking); a repaired method remains recorded there.
4. Escalate
When the sample won't converge after ~3 fixes — whether the trace shows a faithful model still can't propagate (taint dying at a plain instruction the engine should carry through, an engine limitation) or the cause stays unclear — don't add a new method to build.done or alter an existing repaired method's tracking entry. Report it with the brief cause you found (per Output), for the orchestrator to escalate. Don't retry further.
Output
Artifacts
.opentaint/dataflow/<batch>— the batch's model project with the language-specific code model artifacts that the scan consumes; report the path and the exact test command used- the passing methods present in the batch file's
build.done(new methods appended; repaired methods already recorded, per Tracking)
Summary
- the methods modeled and the test status (passing / non-converging)
Tracking
.opentaint/tracking/models/<batch>.yaml — one batch's callable classification, <batch> the plan's filename stem. Every callable sits in exactly one verdict bucket, keyed with the exact language-specific method and signature from the plan so distinct variants stay separate:
passthrough,dataflow— modeled carriers; each entry{ method, signature }skipped— terminal non-carriers; each{ method, signature, reason }engine_issues— a separate bucket for carriers the engine provably can't propagate (built but still dropped); each{ method, signature, reason }. Terminal and treated just likeskipped— the only difference is the reason.merge-skippedcarries it intoskipped.yamlas its ownengine_issuesgroup alongside the regular skippedmethods.
dependencies lists the dependency identifiers a dataflow test project needs. The build block tracks the build — test_project records each dataflow method's test-project status (done if a sample was written into the batch's test project, failed if none could be written so the method was excluded from it), and done holds the finished { method, signature }. Keep it clear from comments
passthrough:
- { method: "<qualified-member-a>", signature: "<language-signature-a>" }
dataflow:
- { method: "<qualified-member-b>", signature: "<language-signature-b>" }
skipped:
- { method: "<qualified-member-c>", signature: "<language-signature-c>", reason: "retains none of its input data" }
engine_issues: []
dependencies: []
build:
test_project:
- { method: "<qualified-member-b>", signature: "<language-signature-b>", status: done }
done: []This skill appends each method whose sample passes to build.done as { method, signature } when absent. A newly assigned method that still fails, or one the engine provably can't propagate, stays out and is reported (per Output); an explicitly repaired method leaves its existing entry unchanged. Don't touch the classification buckets (passthrough/dataflow/skipped/engine_issues) or edit an entry already in build.done.
Constraints
OpenTaint is a whole-program, interprocedural, field-sensitive alias analysis engine. It already propagates through visible application code, calls, aliases, and individual fields; custom rules and models cover only the assigned source, sink, or opaque-method boundary. Compile-time constants and literals carry no taint, so a source or carrier whose output is only a constant introduces nothing.
- Verify only with the model test on the test project
- The test project's sample sources are a fixed input — never edit or recompile them to force a pass; if a faithful model can't pass, leave the method out and report it (per Output)
- Model every dataflow method and overload the batch lists, not only the ones you have a sample for
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

