Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add security policy enforcement of environment variables #1146

Merged
merged 1 commit into from
Sep 8, 2021
Merged

Add security policy enforcement of environment variables #1146

merged 1 commit into from
Sep 8, 2021

Conversation

SeanTAllen
Copy link
Contributor

Supports two different matching schemes:

  • string

This is a direct string match. All characters must be equal.

  • re2

The rule is an re2 regular expression that will be matched against the environment variable.

Environment variables are in the form "KEY=VALUE" as a single string.

The securitypolicy tool has been updated to automatically include any environment variables defined
in the image spec for an image to the allowed environment variables in the generated policy.

Signed-off-by: Sean T. Allen [email protected]

@SeanTAllen SeanTAllen requested a review from a team as a code owner September 3, 2021 14:10
@dcantah dcantah self-assigned this Sep 8, 2021
container.EnvRules = append(container.EnvRules, rule)
}

// cri adds TERM=xterm for all workload containers. we add to all containers
Copy link
Contributor

Choose a reason for hiding this comment

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

This kinda worries me if this is ever changed. I'm still not sure how this even always get's set from our investigation. For now, not sure what else you could do at the moment so not saying to change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this tool is a convenience for developers working on gcs and policy, if it changes, it is easy enough to adjust. this merely saves having to put it in every toml for that someone has.

Copy link
Contributor

Choose a reason for hiding this comment

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

I need to check where the code I'm reviewing lives before I type. This is fine then

Supports two different matching schemes:

- string

This is a direct string match. All characters must be equal.

- re2

The rule is an re2 regular expression that will be matched against the environment variable.

Environment variables are in the form "KEY=VALUE" as a single string.

The securitypolicy tool has been updated to automatically include any environment variables defined
in the image spec for an image to the allowed environment variables in the generated policy.

Signed-off-by: Sean T. Allen <[email protected]>
Copy link
Contributor

@dcantah dcantah left a comment

Choose a reason for hiding this comment

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

lgtm

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.

3 participants