The ash report subcommand silently ignores the configuration file (.ash.yaml) even when explicitly passed via -c. Settings like ash_plugin_modules defined in the config file have no effect.
Root Cause
In automated_security_helper/config/resolve_config.py, the resolve_config() function has an early return when source_dir is None:
if source_dir is None and fallback_to_default:
ASH_LOGGER.verbose("source_dir is null, returning the default config")
if config_overrides:
return apply_config_overrides(config, config_overrides)
return config
The report subcommand (cli/report.py line ~138) calls resolve_config(config_path=config, config_overrides=config_overrides) without passing source_dir, so it always hits this early return and never reads the config file — even when config_path is explicitly provided.
Steps to Reproduce
- Create
.ash/.ash.yaml with:
ash_plugin_modules:
- automated_security_helper.plugin_modules.ash_aws_plugins
- Run:
ash report --format bedrock-summary-reporter \
--output-dir .ash/ash_output \
-c .ash/.ash.yaml \
--log-level VERBOSE
- Observe the log:
source_dir is null, returning the default config
- The reporter plugin is not found because
ash_plugin_modules was never loaded from the file.
Expected Behavior
When -c / --config is explicitly provided, resolve_config should read and parse that file regardless of whether source_dir is set.
Workaround
Use --config-overrides to force the value:
ash report --format bedrock-summary-reporter \
--config-overrides 'ash_plugin_modules=["automated_security_helper.plugin_modules.ash_aws_plugins"]'
Suggested Fix
In resolve_config(), check config_path before the early return:
if source_dir is None and config_path is None and fallback_to_default:
ASH_LOGGER.verbose("source_dir is null, returning the default config")
...
return config
Or pass source_dir from the report command (e.g., default to Path.cwd()).
Environment
- ASH version: v3 (installed via
uvx)
- OS: Linux (Amazon Linux)
The
ash reportsubcommand silently ignores the configuration file (.ash.yaml) even when explicitly passed via-c. Settings likeash_plugin_modulesdefined in the config file have no effect.Root Cause
In
automated_security_helper/config/resolve_config.py, theresolve_config()function has an early return whensource_dir is None:The
reportsubcommand (cli/report.pyline ~138) callsresolve_config(config_path=config, config_overrides=config_overrides)without passingsource_dir, so it always hits this early return and never reads the config file — even whenconfig_pathis explicitly provided.Steps to Reproduce
.ash/.ash.yamlwith:source_dir is null, returning the default configash_plugin_moduleswas never loaded from the file.Expected Behavior
When
-c/--configis explicitly provided,resolve_configshould read and parse that file regardless of whethersource_diris set.Workaround
Use
--config-overridesto force the value:ash report --format bedrock-summary-reporter \ --config-overrides 'ash_plugin_modules=["automated_security_helper.plugin_modules.ash_aws_plugins"]'Suggested Fix
In
resolve_config(), checkconfig_pathbefore the early return:Or pass
source_dirfrom thereportcommand (e.g., default toPath.cwd()).Environment
uvx)