Skip to content

Fix/agent patch config defaults#1054

Merged
greenbonebot merged 3 commits into
mainfrom
fix/agent-patch-config-defaults
Mar 2, 2026
Merged

Fix/agent patch config defaults#1054
greenbonebot merged 3 commits into
mainfrom
fix/agent-patch-config-defaults

Conversation

@ozgen

@ozgen ozgen commented Feb 27, 2026

Copy link
Copy Markdown
Member

What

  • Default missing scan agent config fields to the agent’s existing configuration when building the patch payload.
  • Treat 0 values in update->config as “not set” and inherit from the agent config.
  • Deep-copy scheduler_cron_time to avoid shared ownership.
  • Added unit tests covering merge logic, deep-copy behavior, and guard conditions.

Why

Previously, when update->config was partially provided, missing fields were not defaulted from the agent’s current configuration, which could lead to unintended zero values being sent in the patch payload.

References

GEA-1625

Checklist

  • Tests

When update->config is provided with zero/unset fields, inherit values from the agent's current config.
@ozgen
ozgen requested review from a team as code owners February 27, 2026 13:05
@greenbonebot
greenbonebot enabled auto-merge (rebase) February 27, 2026 13:05
@github-actions

github-actions Bot commented Feb 27, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA ea8b8ac.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@greenbonebot
greenbonebot merged commit 543d4d6 into main Mar 2, 2026
23 checks passed
@greenbonebot
greenbonebot deleted the fix/agent-patch-config-defaults branch March 2, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants