Skip to content

fix RemoteAccessServicesTest: version-stream-aware pattern#70

Merged
stevebeattie merged 2 commits intochainguard-dev:mainfrom
jakeva:fix/remote-access-services-regex-anchor
Apr 3, 2026
Merged

fix RemoteAccessServicesTest: version-stream-aware pattern#70
stevebeattie merged 2 commits intochainguard-dev:mainfrom
jakeva:fix/remote-access-services-regex-anchor

Conversation

@jakeva
Copy link
Copy Markdown
Member

@jakeva jakeva commented Mar 31, 2026

The -* suffix in the package pattern was doing nothing useful (zero or more literal dashes), and without a $ anchor, packages like samba-libs and samba-util-libs matched samba as a prefix, causing false-positive No_Remote_Access failures.

Replaces the suffix with (-\d[\d.]*(-[a-z][a-z0-9-]*)?)?$ to correctly handle version-streamed variants (openssh-9.4, samba-4.19-client) while rejecting alphabetic-only suffixes like -libs or -keysign.

Missing $ anchor on the package name pattern caused samba-libs and
samba-util-libs (Kerberos/LDAP/GSSAPI shared libs pulled in as
transitive dependencies of repmgr) to match the samba prefix check,
generating 46 false-positive No_Remote_Access failures for
postgres-14-repmgr-iamguarded-fips.
@jakeva jakeva self-assigned this Mar 31, 2026
@jakeva jakeva requested a review from stevebeattie March 31, 2026 15:39
Copy link
Copy Markdown
Member

@stevebeattie stevebeattie left a comment

Choose a reason for hiding this comment

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

It's correct to note that with the lack of the trailing anchor, the pattern will match more things than just the packages listed; however the proposed fix will match those packages and superfluously trailing -s.

Because we do have version-streamed packages, we should probably adjust the regex to look for version-streamed variants. That said, the existing regex did not do this correctly either (e.g. wouldn't match mysql-9.4-client).

@jakeva jakeva requested a review from stevebeattie April 1, 2026 04:46
@jakeva jakeva changed the title fix RemoteAccessServicesTest: anchor pattern to prevent false positives on samba-libs fix RemoteAccessServicesTest: replace broken suffix with version-stream-aware pattern Apr 1, 2026
@jakeva jakeva changed the title fix RemoteAccessServicesTest: replace broken suffix with version-stream-aware pattern fix RemoteAccessServicesTest: use version-stream-aware pattern suffix Apr 1, 2026
@jakeva jakeva changed the title fix RemoteAccessServicesTest: use version-stream-aware pattern suffix fix RemoteAccessServicesTest: version-stream-aware pattern Apr 1, 2026
Copy link
Copy Markdown
Member

@stevebeattie stevebeattie left a comment

Choose a reason for hiding this comment

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

Thanks, nice fix.

@stevebeattie stevebeattie dismissed their stale review April 3, 2026 22:05

Has been addressed

@stevebeattie stevebeattie self-requested a review April 3, 2026 22:06
@stevebeattie stevebeattie merged commit 3de6111 into chainguard-dev:main Apr 3, 2026
3 checks passed
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