Skip to content

wip: feat(userspace/falco): clarify rules validation errors#3947

Open
AkashKumar7902 wants to merge 1 commit into
falcosecurity:masterfrom
AkashKumar7902:agent/improve-validate-config-hint
Open

wip: feat(userspace/falco): clarify rules validation errors#3947
AkashKumar7902 wants to merge 1 commit into
falcosecurity:masterfrom
AkashKumar7902:agent/improve-validate-config-hint

Conversation

@AkashKumar7902

@AkashKumar7902 AkashKumar7902 commented Jul 19, 2026

Copy link
Copy Markdown

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

/kind release

If this PR prepares a chart release, uncomment:

/kind chart-release

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area engine

/area tests

/area proposals

/area automation

/area chart

What this PR does / why we need it:

When --validate receives a top-level YAML mapping such as falco.yaml, rules validation currently reports only a structural error. This change adds an actionable hint explaining that --validate accepts rules files and that --dry-run validates a Falco configuration together with its configured rules.

The hint is added in the validate_rules_files application action, so normal rule loading and embedded engine callers are unchanged. JSON stdout remains machine-parseable; the hint stays in the fatal error summary written to stderr.

Which issue(s) this PR fixes:

Related to #3725

Special notes for your reviewer:

This is a draft because #3725 is assigned to @leogr; I would appreciate confirmation that the diagnostic wording and app-layer placement match the intended scope.

Validation:

  • Repository clang-format 18.1.8 and cmake-format 0.6.13 hooks
  • CI-matching minimal Linux build of falco_unit_tests
  • All three focused ActionValidateRulesFiles regressions
  • Full unit suite: 214/214 tests passed
  • Manual CLI E2E: baseline returned the generic error; the patch retained exit code 1 and added the --dry-run hint to stdout and stderr
  • Text, JSON-preservation, and non-config negative cases

Does this PR introduce a user-facing change?:

feat(userspace/falco): suggest `--dry-run` when `--validate` receives a Falco configuration file

Signed-off-by: Akash Kumar <meakash7902@gmail.com>
@poiana

poiana commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AkashKumar7902
Once this PR has been reviewed and has the lgtm label, please assign leogr for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana
poiana requested review from Kaizhe and irozzo-1A July 19, 2026 14:06
@poiana

poiana commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Welcome @AkashKumar7902! It looks like this is your first PR to falcosecurity/falco 🎉

@poiana poiana added the size/L label Jul 19, 2026
@AkashKumar7902
AkashKumar7902 marked this pull request as ready for review July 19, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants