Skip to content

DL3026: Trusted registries wildcard domains#767

Merged
lorenzo merged 1 commit intohadolint:masterfrom
cronik:feature/trusted-registries-wildcard
Feb 25, 2022
Merged

DL3026: Trusted registries wildcard domains#767
lorenzo merged 1 commit intohadolint:masterfrom
cronik:feature/trusted-registries-wildcard

Conversation

@cronik
Copy link
Copy Markdown
Contributor

@cronik cronik commented Jan 22, 2022

What I did

Add support for trusted registry domain wildcards. Private registries like
Artifactory use sub-domain for Docker registries so this will allow users to
allow any repository under a single domain (--trusted-registry "*.megacorp.com").

Refs #630

How I did it

Modified DL3026 isAllowed to search the registries set for entries that are either prefixed or suffixed with "*". For those
entries the item is matched as a suffix or prefix respectively.

This is my very first attempt at Haskell, so please let me know if there is a better way to go about it.

How to verify it

Tests have been added to DL3026Spec tho validate the matching rules.

Adds support for trusted registry domain wildcards. Private registries like
Artifactory use sub-domain for Docker registries so this will allow users to
allow any repository under a single domain (`*.megacorp.com`).

Refs hadolint#630
@lorenzo
Copy link
Copy Markdown
Member

lorenzo commented Feb 25, 2022

thanks!!

@lorenzo lorenzo merged commit a984282 into hadolint:master Feb 25, 2022
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