Skip to content

Don't allow secrets to be extracted without approval#135

Open
nickdavies wants to merge 1 commit intoldayton:mainfrom
nickdavies:kubectl_secrets
Open

Don't allow secrets to be extracted without approval#135
nickdavies wants to merge 1 commit intoldayton:mainfrom
nickdavies:kubectl_secrets

Conversation

@nickdavies
Copy link
Copy Markdown
Contributor

Secrets -o yaml and config --raw could be leaking secrets that should be generally sealed in the cluster so don't allow those by default.

This also rethinks how sometimes-safe commands are treated: commands with opaque tokens (command substitutions, parameter expansions, indirect expansions) that could alter security-sensitive arguments are conservatively blocked. Handlers receive opaque_positions so they can detect when runtime-determined values bypass static checks.

I believe this is a sane pattern for handling this case. I did the same choice in the modules and -c PRs where if there are expansions we just default to unsafe. I think this is scoped down correctly though so that most get commands for kubectl (except for secret are going to be approved automatically still the false-negative should be low

Secrets -o yaml and config --raw are leaking secrets that should be
generally sealed in the cluster so don't allow those by default.

Also rethinks how sometimes-safe commands are treated: commands with
opaque tokens (command substitutions, parameter expansions, indirect
expansions) that could alter security-sensitive arguments are
conservatively blocked. Handlers receive opaque_positions so they can
detect when runtime-determined values bypass static checks.
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.

1 participant