Config file locations
| Scope | Path |
|---|---|
| Global | ~/.codegate/config.json |
| Project override | <scan-target>/.codegate.json |
trusted_directories can only be set in the global config. A project config cannot elevate its own directory to a trusted path.Initial setup
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:| Flag | Purpose |
|---|---|
--path <path> | Write the config file to a custom location instead of ~/.codegate/config.json |
--force | Overwrite an existing config file |
init, CodeGate still works using built-in defaults.Edit your config
Open
~/.codegate/config.json and adjust values to suit your workflow. See Configuration reference for every available key.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.