diff --git a/notes/README.org b/notes/README.org index 4670de5..2f7e918 100644 --- a/notes/README.org +++ b/notes/README.org @@ -3,3 +3,27 @@ serve as documentation in their current state. Think of it as staging for [[../docs]]. + +** The typegraphs + The type graph files are derived from a sarif input file, with various options + controlling output. + + To produce dot maps of a sarif file type graph, from raw (largest) to fully + filled (most compact): + + #+BEGIN_SRC sh + cd ../data/treeio/2022-02-25 + + # Everything: + ../../../bin/sarif-to-dot -t -d results.sarif | dot -Tpdf > typegraph-td.pdf + + # Suppress edges to int/bool/string types in dot graph + ../../../bin/sarif-to-dot -td -n results.sarif | dot -Tpdf > typegraph-tdn.pdf + + # Additionally, only report unique array entry signatures + ../../../bin/sarif-to-dot -td -nu results.sarif | dot -Tpdf > typegraph-tdnu.pdf + + # Additionally, fill in missing (optional) entries in sarif input before other steps. + ../../../bin/sarif-to-dot -td -nuf results.sarif | dot -Tpdf > typegraph-tdnuf.pdf + + #+END_SRC diff --git a/notes/typegraph-td.pdf b/notes/typegraph-td.pdf new file mode 100644 index 0000000..0d12f28 Binary files /dev/null and b/notes/typegraph-td.pdf differ diff --git a/notes/typegraph-tdn.pdf b/notes/typegraph-tdn.pdf new file mode 100644 index 0000000..2d81aa6 Binary files /dev/null and b/notes/typegraph-tdn.pdf differ diff --git a/notes/typegraph-tdnu.pdf b/notes/typegraph-tdnu.pdf new file mode 100644 index 0000000..f7c9abb Binary files /dev/null and b/notes/typegraph-tdnu.pdf differ diff --git a/notes/typegraph-tdnuf.pdf b/notes/typegraph-tdnuf.pdf new file mode 100644 index 0000000..d082b0b Binary files /dev/null and b/notes/typegraph-tdnuf.pdf differ diff --git a/sarif_cli/typegraph.py b/sarif_cli/typegraph.py index 9a7270b..60f2632 100644 --- a/sarif_cli/typegraph.py +++ b/sarif_cli/typegraph.py @@ -1,8 +1,8 @@ """Operations on the type graph produced by sarif-to-dot -u -t -f To get a map of this type graph, use - cd sarif-cli/data/treeio - ../../bin/sarif-to-dot -u -t -f -n -d results.sarif | dot -Tpdf > typegraph.pdf + cd ../data/treeio/2022-02-25 + ../../../bin/sarif-to-dot -u -t -f -n -d results.sarif | dot -Tpdf > typegraph.pdf This file also contains some type graph reference values; these may be moved out into separate files at some point.