Skip to content

Conversation

@Redent0r
Copy link

@Redent0r Redent0r commented Feb 21, 2025

Merge Checklist
Summary

This forces the user to define a validation regex in the settings for the variables that we use to always allow, since we didn't know what value to expect. These 2 types of variables where:

As shown in https://github.com/microsoft/kata-containers/pull/316/files#diff-456165c5b51c7f523a8f6226bab85a095af361c1430c61141d40361fa0a25892L788, these variables where always allowed

Genpolicy tool will panic if one of these type of env variables is found and no validation regex is found in the settings as expected

Test Methodology

test run: https://dev.azure.com/mariner-org/mariner/_build/results?buildId=744467&view=results [PASS]

@Redent0r Redent0r added the upstream/missing PRs that are yet to be upstreamed label Feb 21, 2025
@sprt
Copy link

sprt commented Feb 24, 2025

Please fix PR title

@Redent0r Redent0r changed the title Saulparedes/fix always allowed genpolicy: fix env variables that are always allowed Feb 24, 2025
@Redent0r Redent0r force-pushed the saulparedes/fix_always_allowed branch from a333952 to e43bd8f Compare February 24, 2025 20:49
@Redent0r Redent0r force-pushed the saulparedes/fix_always_allowed branch from e43bd8f to bde2d46 Compare February 24, 2025 21:17
@Redent0r Redent0r marked this pull request as ready for review February 25, 2025 18:00
@Redent0r Redent0r requested review from a team as code owners February 25, 2025 18:00
@Redent0r Redent0r force-pushed the saulparedes/fix_always_allowed branch from bde2d46 to 777e7c3 Compare February 25, 2025 18:51
@Redent0r Redent0r force-pushed the saulparedes/fix_always_allowed branch from 777e7c3 to 6d2a84c Compare February 25, 2025 22:53
@Redent0r Redent0r force-pushed the saulparedes/fix_always_allowed branch from 6d2a84c to 907a418 Compare February 25, 2025 23:43
Instead, require the user to define a validation regex on the settings if not present and use that regex
to validate in the rules.

Signed-off-by: Saul Paredes <[email protected]>
Add regex validation in our settings for variables in our samples that need it.

Signed-off-by: Saul Paredes <[email protected]>
Update samples

Signed-off-by: Saul Paredes <[email protected]>
@Redent0r Redent0r force-pushed the saulparedes/fix_always_allowed branch from 907a418 to 2592ea3 Compare February 26, 2025 18:52
@Redent0r Redent0r requested a review from sprt February 26, 2025 19:14
@Redent0r Redent0r merged commit cfaf9b2 into msft-main Feb 26, 2025
45 of 55 checks passed
@Redent0r Redent0r deleted the saulparedes/fix_always_allowed branch February 26, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream/missing PRs that are yet to be upstreamed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants