Usage¶
ts-obom follows the command conventions of ts-scan: verbs as sub-commands, -o/--output and -f/--format for results, --<front-end>:<option> for front-end specific switches, a profile based config file and an optional tsproject.toml in the scanned directory. If you know ts-scan, ts-obom will feel familiar.
Scan¶
The scan command searches one or more directories for infrastructure-as-code sources, builds the resource graph and extracts the IAM access grants.
Every directory produces one result document. Directories are scanned recursively by the IaC front-ends; a file argument is treated as its parent directory.
The -f <output format> option controls the output format and can be:
ts- the TrustSource OBOM JSON format (default), see Result formatdot- a Graphviz digraph, one cluster per scanned directory. Render it with Graphviz, for example:
Without -o the result is printed to standard output.
Options¶
Front-end specific options are prefixed with the front-end name, like package manager options in ts-scan:
--cloudformation:ignore- Skip CloudFormation and AWS SAM templates--terraform:ignore- Skip Terraform and OpenTofu sources (OpenTofu is handled by theterraformfront-end; the two share the HCL language)
General options:
--tag <TAG>- Stores the SCM tag<TAG>in the result--branch <BRANCH>- Stores the SCM branch<BRANCH>in the result--verbose- Enables verbose mode
The full list of options can be printed using:
User settings¶
Defaults are read from a TOML config file with profiles. The default location is ~/.ts-obom/config and the file is created on first run with an empty default profile.
ts-obom -p ci scan ...selects theciprofilets-obom --config <path> scan ...uses a different config file- environment variables prefixed with
TS_OBOM_override options, for exampleTS_OBOM_SCAN_OUTPUT_PATH=obom.json - a
tsproject.tomlin a scanned directory provides per-project defaults with the same keys
The prefix deliberately differs from ts-scan's TS_ so that both tools can be configured side by side in the same CI job without one picking up the other's variables.
Exit codes¶
0- scan completed, including the case that no IAM grants were found2- usage error (no sources given) or the vendored graph builder's dependencies are missing
What the scan does not do¶
- It does not call any cloud API. Managed policies referenced by ARN (
arn:aws:iam::aws:policy/...) are reported underunresolvedrather than expanded. - It does not run
terraform initortofu init. Remote modules are not downloaded; local modules are followed. - It does not evaluate conditions, permission boundaries or SCPs. The graph is the declared intent, not the effective permission.