Skip to content

fix: harden workflow error matching and input validation - #193

Merged
marcusburghardt merged 2 commits into
complytime:mainfrom
marcusburghardt:fix/workflow-hardening
Jul 30, 2026
Merged

fix: harden workflow error matching and input validation#193
marcusburghardt merged 2 commits into
complytime:mainfrom
marcusburghardt:fix/workflow-hardening

Conversation

@marcusburghardt

Copy link
Copy Markdown
Member

Summary

Two small hardening improvements addressing review feedback from @gxmiranda.

1. Tighten check_suite error matching (safe-settings sync)

Source: PR #186 review

Narrows the error guard from a broad check_suite substring match to the
exact upstream error message:

Cannot read properties of undefined (reading 'check_suite')

This prevents accidentally swallowing an unrelated error whose message
happens to contain that substring.

2. Validate ENTERPRISE_MEMBERS_IGNORE usernames (peribolos drift)

Source: PR #182 review

Adds input validation for ENTERPRISE_MEMBERS_IGNORE values before they
are used to build a grep -vE pattern. GitHub usernames only allow
[a-zA-Z0-9-], so the values are currently safe for regex without
escaping. This guard fails fast if an invalid value is ever added,
preventing unexpected regex behavior.

Narrow the error guard from a broad 'check_suite' substring match
to the exact upstream error message: "Cannot read properties of
undefined (reading 'check_suite')". This prevents accidentally
swallowing an unrelated error whose message happens to contain
that substring.

Addresses review feedback from @gxmiranda on PR complytime#186.

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Add input validation for ENTERPRISE_MEMBERS_IGNORE values before
they are used to build a grep -vE pattern. GitHub usernames only
allow [a-zA-Z0-9-], so the values are safe for regex without
escaping, but this guard fails fast if an invalid value is ever
added -- preventing unexpected regex behavior.

Addresses review feedback from @gxmiranda on PR complytime#182.

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
@marcusburghardt
marcusburghardt force-pushed the fix/workflow-hardening branch from 7f1a8ce to 5702230 Compare July 30, 2026 08:09

@gxmiranda gxmiranda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@marcusburghardt
marcusburghardt merged commit 1371f19 into complytime:main Jul 30, 2026
13 checks passed
@marcusburghardt
marcusburghardt deleted the fix/workflow-hardening branch July 30, 2026 09:00
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.

2 participants