Skip to content

The Great Auto-Update Identity Crisis #6429

@username-is-already-taken2

Description

Its my opinion that parts of the codebase reference auto-update while others use auto_update within the mondoo.yml configuration file.

The config option appears to be having an existential crisis, leading to inconsistent behaviour depending on which spelling a component believes in.

To demonstrate, on a docker instance, I've run the install script and registered my container to space.

I edit /etc/opt/mondoo/mondoo.yml

auto_update: false
auto-update: false

I'll delete any existing providers rm -rf /opt/mondoo/providers/*

Both the shell and linter fail

root@instance:/# cnspec shell
x cannot find installed provider for conn name=local
cnspec policy lint ./example-policy.mql.yaml
→ lint policy bundle file=./example-policy.mql.yaml
 RULE ID                       LEVEL    FILE                     LINE  MESSAGE
.......
FTL invalid policy bundle

I'll edit the config file and change auto_update: true and re run the same commands

cnspec shell works

cnspec shell
→ installing provider 'os' version=11.4.82
→ successfully installed os provider path=/opt/mondoo/providers/os version=11.4.82
→ installing provider 'network' version=11.0.108
→ successfully installed network provider path=/opt/mondoo/providers/network version=11.0.108
→ Connecting to your local system. To learn how to scan other platforms, use the --help flag.
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
→ connected to Debian GNU/Linux 13 (trixie)
...
>

cnspec policy lint fails still

cnspec policy lint ./example-policy.mql.yaml
→ lint policy bundle file=./example-policy.mql.yaml
 RULE ID                       LEVEL    FILE                     LINE  MESSAGE
...
FTL invalid policy bundle

if I now change auto-update: true within the config policy will now pass

cnspec policy lint ./example-policy.mql.yaml
→ lint policy bundle file=./example-policy.mql.yaml
→ installing provider 'aws' version=11.5.107
→ successfully installed aws provider path=/opt/mondoo/providers/aws version=11.5.107
→ installing provider 'google-workspace' version=11.1.108
...

The docs say auto-update should manage the provider updates link.

Incidentally, again on a fresh machine if I do an install and do a register into a space default we are setting both

root@337a0fccbb69:/# cat /root/.config/mondoo/mondoo.yml
agent_mrn: //agents.api.mondoo.app/spaces/competent-villani-397388/agents/38ZBq******************
annotations: {}
api_endpoint: https://us.api.mondoo.com
api_proxy: ""
auto-update: true
auto_update: true
...

I think we should squash these, with a pref for auto_update but thats just my opinion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions