Configuration¶
OSS IQ reads settings from command-line flags, environment variables and a config file. Part of the reference.
You have |
Go to |
|---|---|
A flag such as |
|
A config file to write or find |
|
A supply-chain policy to commit with a project |
|
A question about which GitHub token a scan uses |
|
A scan that asks for a login, or should not |
|
A firewall or proxy to configure |
|
A mirror or private registry to scan against |
For each setting, the first source that sets it wins:
Command-line flags
Environment variables
The config file
Built-in defaults
The cooldown has one more source: a project’s policy file sets it when none of those does.
Configuration directory¶
OSS IQ keeps its files in ~/.config/ossiq/, or in $XDG_CONFIG_HOME/ossiq/ when
XDG_CONFIG_HOME is set:
File |
Contents |
|---|---|
|
Optional settings, one |
|
HTTP cache for registry and GitHub responses. Move it with |
The GitHub login is not in this directory; it lives in the system secret store.
Config file¶
The config file uses dotenv format: KEY=value lines and # comments. Any OSSIQ_* variable
from the Settings table can go in it:
# ~/.config/ossiq/config
OSSIQ_COOLDOWN_PERIOD=14
OSSIQ_CACHE_TTL=48
To read a different file, pass it before the command: ossiq --config ./ossiq.conf status. That
file then replaces the default one.
OSS IQ also reads ~/.ossiq/config, where the file lived before. When both files set a key, the
one in the configuration directory wins.
Project policy file¶
A project’s .ossiq.yaml holds the supply-chain rules its team agrees on. Commit it next to the
manifest. Set a supply-chain policy walks through
writing one.
OSS IQ looks for the file in the project directory, then in each parent directory, and stops at
the first directory that holds a .git. An unknown key, a wrong value or a missing version stops
the command with an “Invalid policy file” message that names each entry.
The JSON Schema ships with OSS IQ as ossiq/data/project_config_v1.schema.json.
Key |
Values |
Effect |
|---|---|---|
|
|
Required. The schema version of the file |
|
A whole number, |
Days a version must age before OSS IQ recommends it. Used only when no flag, environment variable or config file sets the cooldown |
|
|
The weakest build evidence a version may carry |
|
|
Refuse a version with less build evidence than an earlier version of its major line |
|
|
The weakest protection a direct dependency’s GitHub repository may have on its default branch |
|
A list |
Waivers: packages and releases that a rule skips |
|
A whole number, |
Queue only this many steps in |
|
A non-empty string |
Shell command |
A rule is off unless its block is present. Each entry under policy.exceptions takes these keys:
Key |
Required |
Values |
|---|---|---|
|
yes |
A registry name, or a glob such as |
|
yes |
Text |
|
no |
A list of exact versions, quoted. Without it, every version |
|
no |
A list of |
|
no |
|
Settings¶
Every setting has a global flag, an environment variable, or both. Global flags go before the
command, for example ossiq --cutoff-date 2025-01-01 --cooldown-period 14 status. Supply-chain
rules are not settings: they belong to the project, in its policy file. A
value a setting can’t take stops the command with an “Invalid Configuration” message that names
the variable.
Variable |
Flag |
Default |
Effect |
|---|---|---|---|
|
|
— |
GitHub token, for CI and containers. See GitHub token |
|
— |
— |
Used when |
|
— |
|
|
|
— |
OSS IQ’s app |
Client ID of the GitHub OAuth app used for login. Set it only to log in through your own OAuth app, with device flow enabled |
|
|
|
HTTP cache file |
|
|
|
Hours to keep cached responses |
|
|
|
Hours to keep GitHub stability data (commits, activity, README) |
|
|
today |
Hide versions published after this date (23:59:59 UTC), to reproduce a past state |
|
|
|
Days a new version must age before the solver recommends it. |
|
|
on |
Measure upstream repository stability |
|
|
on with a token |
The GraphQL engagement-flow channel |
|
|
on |
Detect the installed Python, Node.js and npm or pnpm versions |
|
— |
|
npm registry. See Private registries and mirrors |
|
— |
|
PyPI JSON API |
|
— |
|
PyPI Simple API |
|
— |
|
OSV API |
|
— |
|
EPSS API |
|
— |
|
GitHub API. The login still uses github.com |
|
— |
|
changelog IQ API |
|
— |
|
pypistats API |
|
— |
|
npm download counts API |
— |
|
— |
State the runtime the project runs on, for example |
— |
|
|
Read this config file in place of the default one |
— |
|
off |
Skip the HTTP cache for this run |
— |
|
off |
Print a full traceback on error, in place of the error message |
|
|
off |
Detailed progress output |
|
|
off |
Debug logging |
GitHub token¶
A scan with a GitHub token can make 5,000 GitHub API requests an hour; without one, 60. To log
in, see auth and Log in to GitHub.
Token precedence¶
Scans use the first token found, in this order:
The global
--github-token(-T) flag. Avoid it: a token on the command line shows up in shell history and process listings.The
OSSIQ_GITHUB_TOKENenvironment variable.The
GITHUB_TOKENenvironment variable.The stored GitHub login.
OSSIQ_GITHUB_TOKENin the config file. The file is plaintext, so prefer the login.
A token from the flag or the environment never touches the secret store. ossiq auth status shows
which source won.
When a scan logs in¶
A scan that finds no token starts the login itself and shows the code on stderr. With a terminal
it waits for approval; without one it exits with status 75. Only scanning commands log in:
status, html, export, info, add, update-context, plan and apply.
A scan skips the login, and runs at 60 requests an hour, when:
OSSIQ_GITHUB_AUTHisoff, in the environment or the config file;the
CIenvironment variable is set to anything but0orfalse;the machine has no usable secret store.
In the first two cases the scan ignores the stored login as well. The MCP server offers the login once per session; after a cancelled or expired code, its scans run without a token.
Storage¶
The login lives in the operating system’s secret store, through the keyring library:
Item |
Value |
|---|---|
Secret store |
macOS Keychain, Windows Credential Manager, or Secret Service or KWallet on Linux |
Service name |
|
Entries |
|
Timeout |
A call with no answer after 3 minutes, such as an unanswered dialog, marks the store unavailable for the rest of the run |
The pending entry holds GitHub’s device code, which stays secret until the login is approved.
Tokens¶
Scope: none. The token can read public data only.
Lifetime: the access token lasts 8 hours, and OSS IQ refreshes it before it expires. The refresh token lasts about 6 months. GitHub replaces both on every refresh.
Validation: OSS IQ checks a stored token with one
GET /userrequest, at most once every 10 minutes per process. A revoked token is discarded, and the next scan offers a new login.Never written or printed: no token, and no device code, appears in config files,
mcp.json, the HTTP cache, logs,--verboseoutput, exports or HTML reports.
Data sources¶
A scan reads public data from these hosts. Allow them through a firewall or proxy, or point OSS IQ at a mirror with the variable in the last column:
Source |
Host |
Used for |
Variable |
|---|---|---|---|
|
Package metadata, version history and download counts for JavaScript packages |
|
|
|
Package metadata, version history, project status, per-file build attestations and download counts for Python packages |
|
|
|
Known vulnerabilities (CVEs and security advisories) |
|
|
|
The probability that a CVE is exploited in the next 30 days |
|
|
|
Repository activity, releases, maintenance signals and how each direct dependency’s default branch is protected |
|
|
|
The changelog between two versions, shown by |
|
When a source is unreachable, the scan still finishes and reports what is missing. See Partial data.
Private registries and mirrors¶
A scan follows the registry your package manager installs from, so a project that uses a mirror gets its data from that mirror. OSS IQ reads the registry from the project’s own config:
Package manager |
OSS IQ reads |
|---|---|
npm, pnpm |
|
uv |
|
pip |
|
A URL you set yourself wins. Set an OSSIQ_* variable from the Settings table, in the
environment or the config file, and it replaces what the project names for that source. The other
sources keep following the project.
PyPI has two endpoints, and an index names only one. OSS IQ takes the Simple API from the index URL.
When that URL ends in /simple, it also derives the JSON API: https://mirror.example/simple gives
https://mirror.example/pypi. For any other URL, such as https://mirror.example/root/pypi/+simple/,
OSS IQ changes neither PyPI setting. Set OSSIQ_PYPI_SIMPLE_URL and OSSIQ_PYPI_JSON_URL yourself.
OSS IQ asks a registry without logging in, so it doesn’t follow a registry that needs a login. The scan keeps its own setting, which is the public registry unless you set one, when:
the registry URL holds credentials (
https://user:pass@host/);the npm config sets
_authToken,_author_passwordfor the registry’s host;the URL isn’t
httporhttps, for example an unexpanded${VAR};the URL is a PyPI index that doesn’t end in
/simple.
--debug logs each registry OSS IQ skips and why.
These aren’t supported:
scoped registries (
@scope:registryin an.npmrc): a scoped package is still looked up in the default registry;--index-urllines inside arequirements.txt;an index that serves only the Simple API, because OSS IQ reads package metadata from the PyPI JSON API.