code

module
v0.0.0-...-344772a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0

README

Code

SafeDep Code Analysis Framework

OpenSSF Scorecard

[!WARNING] Code Analysis Framework (CAF) is under active development. Contracts and APIs are subject to change.

See docs/ADR.md for architectural decisions.

See docs/detection.md for the APIs that security detections use.

See docs/projectgraph.md for the project graph: the call graph of a whole project across its files and into its dependencies, with the index, link, roots, reach and summary steps.

See docs/modgraph.md for the module graph of a Go module: which module imports which, from the code on the disk, with no Go toolchain.

See docs/distgraph.md for the distribution graph of a Python project: which installed distribution imports which, from the code on the disk, with no Python.

Directories

Path Synopsis
ast
Package distgraph builds the distribution graph of a Python project from the code on the disk: which installed distribution of a site-packages directory imports which.
Package distgraph builds the distribution graph of a Python project from the code on the disk: which installed distribution of a site-packages directory imports which.
examples
distgraph command
Command distgraph prints the distribution graph of a Python project: each distribution of its site-packages directories, what Build knows of its imports, and the edges between them.
Command distgraph prints the distribution graph of a Python project: each distribution of its site-packages directories, what Build knows of its imports, and the edges between them.
modgraph command
Command modgraph prints the module graph of a Go module: each module of the build list, what Build knows of its imports, and the edges between them.
Command modgraph prints the module graph of a Go module: each module of the build list, what Build knows of its imports, and the edges between them.
plugin command
projectgraph command
Command projectgraph builds the call graph of a directory and prints the path from a root to each target, as main.py:3 -> handlers.py:12 -> yaml//load.
Command projectgraph builds the call graph of a directory and prints the path from a root to each target, as main.py:3 -> handlers.py:12 -> yaml//load.
resolver command
walker command
Package fileindex holds the index of one source file: what the link step of a project graph needs from the file.
Package fileindex holds the index of one source file: what the link step of a project graph needs from the file.
roots
Package roots holds the root rules of the project graph: the rule types, the loader and the embedded rules file.
Package roots holds the root rules of the project graph: the rule types, the loader and the embedded rules file.
store
Package store defines where a build keeps file indexes and plugin artifacts between runs.
Package store defines where a build keeps file indexes and plugin artifacts between runs.
store/localdbstore
Package localdbstore is a store.Pruner in the SQLite file of a dry/localdb manager.
Package localdbstore is a store.Pruner in the SQLite file of a dry/localdb manager.
store/memstore
Package memstore is a store.Pruner in memory, for tests and one-shot callers.
Package memstore is a store.Pruner in memory, for tests and one-shot callers.
store/storetest
Package storetest is the test suite that every store.Store passes.
Package storetest is the test suite that every store.Store passes.
internal
pathglob
Package pathglob matches slash paths against globs.
Package pathglob matches slash paths against globs.
testutil
Package testutil holds the helpers that the tests of several packages share.
Package testutil holds the helpers that the tests of several packages share.
ecmascript
Package ecmascript answers the questions of a detection about one JavaScript or TypeScript file: what a name stands for, what a call calls, and what an assignment writes to.
Package ecmascript answers the questions of a detection about one JavaScript or TypeScript file: what a name stands for, what a call calls, and what an assignment writes to.
grammar
Package grammar names the version of the tree-sitter grammar of each language.
Package grammar names the version of the tree-sitter grammar of each language.
Package langcode names the languages that safedep/code parses.
Package langcode names the languages that safedep/code parses.
Package modgraph builds the module graph of a Go project from the code on the disk: which module of the build list imports which.
Package modgraph builds the module graph of a Go project from the code on the disk: which module of the build list imports which.
pkg
ds
helpers
Code generated by scripts/generate_go_stdlibs.sh; DO NOT EDIT.
Code generated by scripts/generate_go_stdlibs.sh; DO NOT EDIT.
ts
Package plugin : This package is used for plugin implementations.
Package plugin : This package is used for plugin implementations.
indexer
Package indexer builds the file index of each source file: the projection of the call graph of the file into the records of github.com/safedep/code/fileindex.
Package indexer builds the file index of each source file: the projection of the call graph of the file into the records of github.com/safedep/code/fileindex.
Package projectgraph links the file indexes of a project into one call graph.
Package projectgraph links the file indexes of a project into one call graph.
modules
Package modules maps an import, as the source writes it, to a file of the project.
Package modules maps an import, as the source writes it, to a file of the project.
overlay
Package overlay reads a file of call edges that a model proposed offline and merges them into a project graph.
Package overlay reads a file of call edges that a model proposed offline and merges them into a project graph.
reach
Package reach answers which targets a project graph reaches from its roots.
Package reach answers which targets a project graph reaches from its roots.
rootmatch
Package rootmatch finds the roots of a project graph: the definitions and the module top levels that the root rules mark.
Package rootmatch finds the roots of a project graph: the definitions and the module top levels that the root rules mark.
summary
Package summary gives the summary of one package version of dependency code: for each exported symbol of the package, the external symbols of its own dependencies that the symbol reaches, and the uncertainties of the search.
Package summary gives the summary of one package version of dependency code: for each exported symbol of the package, the external symbols of its own dependencies that the symbol reaches, and the uncertainties of the search.
summary/summarytest
Package summarytest checks a summary against the reach query of its unit graph.
Package summarytest checks a summary against the reach query of its unit graph.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL