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 question about which GitHub token a scan uses |
|
A scan that asks for a login, or should not |
|
A firewall or proxy to configure |
For each setting, the first source that sets it wins:
Command-line flags
Environment variables
The config file
Built-in defaults
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.
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.
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 versions |
— |
|
— |
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:
Source |
Host |
Used for |
|---|---|---|
|
Package metadata, version history and download counts for JavaScript packages |
|
|
Package metadata, version history 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 and maintenance signals |
When a source is unreachable, the scan still finishes and reports what is missing. See Partial data.