Scan settings

When a repository is scanned, how deep each scan looks, and which checks run, from the terminal.

6 sections3 min read

cf settings covers three things: what triggers a scan, how deep each scan looks, and which analyses run when one happens. All three are per repository.

Reading the current settings

Print thembash
cf settings
cf settings --json
cf settings --agent

cf settings on its own changes nothing. It prints the repository's current trigger, its schedule when it has one, its depth, and its checks, each section showing the option in force against the ones it could be. Anything the product cannot do yet is shown and marked, rather than left off the list for you to wonder about.

The subcommands are what change something. Give one a value and it sets it. Give it none and it asks: a list to choose from for the trigger, the interval, and the depth, and a set of checkboxes for the checks, pre-ticked with what the repository has now. Choosing scheduled asks for the interval straight after.

Triggers

What starts a scanbash
cf settings mode manual
cf settings mode push
cf settings mode scheduled --every 6h
cf settings every 24h
ModeWhen a scan starts
manualOnly when you ask
pushEvery commit that lands on the default branch
scheduledOn a fixed interval, whether or not anything changed

Intervals are 1h, 6h, 12h, 24h, and 168h, and only mean anything under scheduled. See Scan triggers.

Depth

How hard each scan looksbash
cf settings depth
cf settings depth max
cf settings depth default
DepthWhat it means
defaultThe full pipeline on every scan. Balanced depth and speed.
maxKeeps sending fresh passes until nothing new turns up. Slower, built for audits.

Depth applies from the next scan. The everyday posture is default; switch to max for an audit or a release gate, then switch back. See Scan depth.

Checks

Which analyses runbash
cf settings checks sast,sca,secrets,iac
cf settings checks balanced
cf settings checks sbom --add
cf settings checks quality --remove
CheckWhat it looks for
sastVulnerabilities in code you wrote
scaKnown vulnerabilities in your dependencies
secretsCredentials committed into the repository
iacUnsafe infrastructure and configuration settings
qualityCode smells and complexity
sbomComponent inventory, for export

Presets: essentials is sast, sca, secrets. balanced adds iac and quality. everything adds sbom. --add and --remove change one check without restating the rest. See Checks.

One more check is named and cannot run

runtime appears in the list, marked as unavailable. It needs an agent inside a running workload, which a scan of committed code cannot provide, so setting it is refused rather than accepted and quietly ignored.

Who can change any of this

Scan settings are an owner or admin decision. A member reading them gets the same answer everyone else does, and a member changing them gets organization_forbidden. See Organizations.

Have a correction or need help?

Email the docs team