Config file locations
The global config applies to all scans. The project config applies only when that directory is the scan target.
trusted_directories can only be set in the global config. A project config cannot elevate its own directory to a trusted path.Initial setup
1
Install CodeGate
2
Create a global config with defaults
~/.codegate/config.json populated with all default values, making it easy to review and tune your preferences.Available flags:If you skip
init, CodeGate still works using built-in defaults.3
Edit your config
Open
~/.codegate/config.json and adjust values to suit your workflow. See Configuration reference for every available key.4
Optionally add a project override
Place a
.codegate.json file in the root of a project directory. Settings there apply only when that directory is the scan target and are merged with the global config according to the precedence rules below.Precedence and merge rules
When resolving the effective configuration, CodeGate applies the following rules: Scalar values (strings, booleans, numbers) follow a first-wins priority:trusted_directories— global-only. Project config values for this key are ignored.blocked_commands— merged with defaults. The default set (bash,sh,curl,wget,nc,python,node) is always retained even if the project or global config specifies additional commands.rule_pack_paths,allowed_rules,skip_rules,suppress_findings, andsuppression_rules— merged across global and project config.
Default config
Runningcodegate init produces a file with the following content:
The project config (
.codegate.json) supports the same keys as the global config, except trusted_directories. You do not need to repeat all keys — only include the values you want to override or extend.