Skip to content

feat: add 7 validators - credentials, log/exec labels, unset_environ (Resolves #465)#466

Merged
SJrX merged 1 commit into
242.xfrom
issue-465
Jun 20, 2026
Merged

feat: add 7 validators - credentials, log/exec labels, unset_environ (Resolves #465)#466
SJrX merged 1 commit into
242.xfrom
issue-465

Conversation

@SJrX

@SJrX SJrX commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Resolves #465. Seven validators calibrated against the systemd C parsers, in SimpleGrammarOptionValues, each with valid + invalid tests.

Stacked on #464 (both edit AiGenerated.kt) — base is set to issue-463; it auto-retargets to 242.x once #464 merges. Merge #464 first.

Validator ltypes Calibrated to
config_parse_set_credential 0,1 id:data; id = credential_name_valid (no / : ctrl, not ./..); data arbitrary
config_parse_load_credential 0,1 id[:source]; id = credential_name_valid; source loose
config_parse_log_namespace 0 log_namespace_name_valid (filename-safe, no /, not ./..)
config_parse_log_extra_fields 0 list of FIELD=value, FIELD = [A-Z][A-Z0-9_]{0,63}
config_parse_exec_selinux_context 0 optional - + specifier-validated string
config_parse_exec_smack_process_label 0 optional - + specifier-validated string
config_parse_unset_environ 0 list of env name or NAME=value

Impact

  • The credential parsers cover ltypes 0 and 1, so 9 burn-down entries clear: OptionValueTest 366 → 357 missing functions (1979 → 2024 found).
  • Grammars are biased toward false-negatives over false-positives (documented per-validator in the KDoc); full suite passes, no regressions.

🤖 Generated with Claude Code

@SJrX SJrX changed the base branch from issue-463 to 242.x June 20, 2026 17:59
@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown

Test Results

1 110 tests   1 110 ✅  48s ⏱️
  294 suites      0 💤
  294 files        0 ❌

Results for commit 87f5cbc.

♻️ This comment has been updated with latest results.

…ce, log_extra_fields, exec_selinux_context, exec_smack_process_label, unset_environ (Resolves #465)

Each grammar is calibrated against the systemd C parser, biased toward
false-negatives over false-positives (documented per-validator in KDoc):

- config_parse_set_credential (ltypes 0,1): <id>:<data>; id is
  credential_name_valid (no '/' ':' control, not "."/".."), data arbitrary.
- config_parse_load_credential (ltypes 0,1): <id>[:<source>]; id is
  credential_name_valid, source loosely constrained.
- config_parse_log_namespace: log_namespace_name_valid (filename-safe,
  no '/', not "."/"..").
- config_parse_log_extra_fields: list of FIELD=value, FIELD a journal
  field name [A-Z][A-Z0-9_]{0,63}.
- config_parse_exec_selinux_context / config_parse_exec_smack_process_label:
  optional leading '-' then a specifier-validated string.
- config_parse_unset_environ: list of env names or NAME=value assignments.

Because the credential parsers cover ltypes 0 and 1, this clears 9 burn-down
entries: OptionValueTest 366 -> 357 missing functions (1979 -> 2024 found).
Each validator ships valid + invalid tests; full suite passes.

Stacked on #464 (both touch AiGenerated.kt); merge #464 first.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@SJrX SJrX merged commit da391b2 into 242.x Jun 20, 2026
3 checks passed
@SJrX SJrX deleted the issue-465 branch June 20, 2026 18:40
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.

Add 7 validators - set/load_credential, log_namespace, log_extra_fields, selinux_context, smack_process_label, unset_environ

1 participant