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 YAML to Markdown conversion script and generated Markdown files #497

Merged
merged 46 commits into from
Jun 27, 2024

Conversation

eaudetcobello
Copy link
Contributor

@eaudetcobello eaudetcobello commented Jun 14, 2024

This contains every control in CIS adapted to Canonical K8s in markdown form. There is also the python script and jinja template.

Note this doesn't have the metadata for webpages yet.

@eaudetcobello eaudetcobello requested a review from a team as a code owner June 14, 2024 20:23
@eaudetcobello eaudetcobello changed the title initial version of cis hardening reference cis hardening reference Jun 14, 2024
@eaudetcobello eaudetcobello marked this pull request as draft June 14, 2024 20:36
@eaudetcobello eaudetcobello force-pushed the cis-hardening-docs-2 branch 2 times, most recently from 353ccfc to a259434 Compare June 15, 2024 02:15
and drive-by simplifications
DATA_DIR is hard-coded in master.cis-yaml
it is not a variable this script has to override
@eaudetcobello eaudetcobello marked this pull request as ready for review June 15, 2024 03:12
Copy link
Contributor

@evilnick evilnick left a comment

Choose a reason for hiding this comment

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

Nice so far! Questions and comments:

  • The output files should not go directly to docs, that isn't how we do it. Create a 'cis' directory in '_parts' and put them in there
  • As far as I understand, this is a list of the various tests and remediations which apply which we do need, but we also need/want a list of the ones which Fail without user steps. Are we going to autogenerate that too?
  • i made a few suggestions on the script. I would rather try and generate something that is expected to pass linting because then if linting fails we know something has gone wrong
  • i will also a few notes on some of the generated output on things we can improve.

k8s/scripts/cis-template.jinja2 Outdated Show resolved Hide resolved
k8s/scripts/cis-template.jinja2 Outdated Show resolved Hide resolved
k8s/scripts/cis-template.jinja2 Outdated Show resolved Hide resolved
k8s/scripts/cis-template.jinja2 Outdated Show resolved Hide resolved
k8s/scripts/cis-template.jinja2 Outdated Show resolved Hide resolved
k8s/scripts/cis-yaml-to-md.py Outdated Show resolved Hide resolved
we support configuring etcd through /etc/default/etcd, therefore
the only configuration relevant to us is through environment variables on the /usr/bin/etcd process.

This commit goes hand in hand with : canonical/kube-bench@a4f580b
@evilnick
Copy link
Contributor

Aren't the outputs still in the wrong order? I thought it should go:

Other than that, as none of this is actually visible I suggest we merge so:

  • I can consume it in docs PR
  • wecan further imrpove without blocking other work

@eaudetcobello eaudetcobello changed the title cis hardening reference cis hardening reference script and markdown Jun 27, 2024
@eaudetcobello eaudetcobello changed the title cis hardening reference script and markdown Add YAML to Markdown conversion script and generated Markdown files Jun 27, 2024
@eaudetcobello eaudetcobello merged commit 00612a7 into main Jun 27, 2024
11 checks passed
@eaudetcobello eaudetcobello deleted the cis-hardening-docs-2 branch June 27, 2024 20:02
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