CLI reference¶
Install the scanner first. On Windows the program is observes.exe.
All options are command-line flags. Some can also be set with environment variables, listed
next to them below. Run observes --help for ready-to-copy example commands, and
observes --version for the scanner's version and the versions of the components built into it.
This page covers Azure DevOps scans. For -t entra and -t gcp sweeps, see
Cloud identity scans.
Scan target¶
| Flag | Description |
|---|---|
-t, --target-platform |
azure_devops (the default), entra or gcp. See Cloud identity scans for the last two. |
-o, --organization |
The Azure DevOps organisation to scan. Required for Azure DevOps scans. |
-j, --job-id |
An ID for this scan. The result file is scan_<job-id>.jsonl. Optional: by default it is <platform type>:<platform id>:<UTC scan time>, for example azure-devops:contoso:2026-10-18T14-05-09Z, so each run gets its own ID. Characters other than letters, numbers and . _ : - are replaced with _. |
Authentication¶
| Flag | Environment variable | Description |
|---|---|---|
--auth-mode |
default (the default), pat, service-principal or managed-identity. See Authentication. |
|
-p, --pat-token |
AZURE_DEVOPS_PAT |
The PAT, for --auth-mode pat. Prefer the environment variable. |
--tenant-id |
AZURE_TENANT_ID |
The Microsoft Entra tenant ID, for a service principal. |
--client-id |
AZURE_CLIENT_ID |
The app registration's client ID, or a user-assigned managed identity's client ID. |
--client-secret |
AZURE_CLIENT_SECRET |
The service principal's secret. Prefer a certificate. |
--client-certificate-path |
A PEM or PFX certificate for the service principal. With --auth-mode default, set AZURE_CLIENT_CERTIFICATE_PATH instead. |
Scan scope and speed¶
| Flag | Description |
|---|---|
--projects |
Comma-separated project names or IDs to scan. Scans every project by default. |
-rb, --top-branches-to-scan |
Branches per repository to scan besides the default branch. -1 for all branches, 0 for the default branch only. Default 5. |
--runs-since <DATE> |
Collect only pipeline runs since DATE. See Incremental scans. |
--skip-builds |
Skip build and build pipeline data. Resources and permissions are still collected. |
--skip-feeds |
Skip artifact feeds. |
--skip-committer-stats |
Skip committer statistics. |
--skip-users |
Skip users, RBAC and PAT token discovery. |
--skip-sast |
Skip SAST scanning of pipeline configurations. |
--skip-job-purpose |
Skip classifying what each job does, such as build, test, SAST, DAST or deploy. |
Cloud identities¶
These flags record the cloud identities that Azure DevOps service connections, variable groups and secure files use. To sweep a whole Entra ID tenant or Google Cloud organisation instead, see Cloud identity scans.
| Flag | Description |
|---|---|
--resolve-identities |
Extract the identities and resolve them through the cloud's APIs, with your cloud credentials: DefaultAzureCredential (such as az login) for Entra ID, Application Default Credentials for Google Cloud. |
--extract-identities-only |
Extract identity metadata without calling any cloud API, so no cloud credentials are needed. Implies --resolve-identities. Resolve them later by re-running with --resolve-identities, or one identity at a time with a cloud identity scan and --identity-ids. |
--gcp-credentials-file <PATH> |
Resolve Google Cloud identities with this credentials JSON instead of Application Default Credentials. |
--gcp-impersonate-service-account <EMAIL> |
Resolve Google Cloud identities as this service account. Needs roles/iam.serviceAccountTokenCreator. |
Logic containers¶
| Flag | Description |
|---|---|
--logic-container-selector <PATHS> |
Comma-separated dotted paths into each identity's resolution result, such as subscription.tags.team or project_metadata.labels.environment. Up to 10. Implies --resolve-identities, so it can't be combined with --extract-identities-only. Also accepted as --logic-container-selectors. |
A selector's last segment names a logic container group (team), and each value it finds names a
container in that group (TeamA, TeamB). Observes creates missing groups and containers and adds
the resource to them. A path that ends on an object, such as resources.tags, creates a group per
key.
- The selectors apply to every service connection, variable group and secure file. A resource can
also name its own: a
logic-container-selector: <paths>line in a service connection's description, or alogic-container-selectorvariable (variable groups) or property (secure files). - Without any selector, Azure connections use
subscription.tags.environmentand Google Cloud connectionsproject_metadata.labels.environment.--logic-container-selectorreplaces that default. - Selectors defined in Observes (Logic Containers > Selectors) are fetched when uploading to Observes and applied after the command line's, at most 10 in all. If Observes can't be reached, the scan continues with the command line's selectors.
Uploading to Observes¶
| Flag | Environment variable | Description |
|---|---|---|
--observes-platform-url |
OBSERVES_PLATFORM_URL |
Your Observes API URL. |
--observes-platform-api-key |
OBSERVES_PLATFORM_API_KEY |
A scan upload API key. Prefer the environment variable. |
With both set, the scanner fetches your tenant's logic container selectors, then uploads the results when the scan finishes. See Upload the results.
Output¶
| Flag | Description |
|---|---|
-r, --results-dir |
Where to write the results. Default: the current directory. |
-s, --silent, --quiet |
Hide progress messages. Warnings and errors still print, and the full log is still written to scanner_logs/. |
Examples¶
Incremental scans¶
To collect only recent activity, pass the previous scan's scan_start value to --runs-since.
You'll find it in the previous scan's results.
- All scanner times are UTC, matching Azure DevOps. A value without an offset, such as
2026-10-03or2026-10-03T11:23:53, is read as UTC, not your local time. For a local time, include its offset, for example2026-10-03T12:23:53+01:00. - Future times are rejected.
- Builds are included if they finished after the given time. Builds still running are picked up by a later scan, once they finish.
- Classic Releases are included if they were created, or had a stage deployment updated, after the given time.
- Using the previous
scan_startleaves no gaps. Runs that finish while a scan is in progress may appear in both that scan and the next. - Definitions, resources, permissions and users are still scanned in full. Commit history keeps its fixed 90-day window.
Scans from older scanner versions
Older scanner versions wrote scan_start in the scanning machine's local time, with no
offset. Add the correct offset before passing one of those values to --runs-since.