Skip to main content

Automated Cloud Custodian Policy Documentation

What is c7n-autodoc?

Automated Cloud Custodian policy documentation for your business partners.

Why use c7n-autodoc?

Administrators of cloud platforms need provide their business partners with clear and accurate documentation regarding the security, governance and cost control policies. The easiest way to stay on top of your documentation is to automate it. This utility will create an HTML file with easy to read information regarding your existing Cloud Custodian policies.

Features include:

  • Automatically writes to S3 bucket
  • Groups policies by resource type
  • Groups policies by category (i.e 'Security & Governance' vs 'Cost Controls')
  • Provide links to underlying file in GitLab/GitHub
  • Uses policy tags to determine applicable environments

Assumptions

  • You have added any necessary security controls to the destination S3 bucket
  • Local credentials exist for the boto3 module to push the file to S3

Installation

NOTE: Requires python3

pip3 install pyyaml boto3 jinja2 jsonschema

Configuration

The only item you should need to customize is the configuration YAML file which is required by the script. Look at the example file provided to determine which fields are required and which are optional. You can also customize the jinja2 template to further modify the HTML documentation which is created.

The S3 bucket which will house the HTML file needs to have Static website hosting enabled. The default (index.html, error.html) are fine because you will be directly targeting the c7n-autodoc.html file.

Run

For the best results this script should be run as a part of a CI/CD pipeline.

python3 c7n-autodoc.py -c my_config_file.yml

Assuming there aren't any issues you should see the HTML file in the S3 bucket.

Example

alt text

TODO

  • Account for different policies for proper rendering
  • Improved UI layout
  • Easier user setup

Metadata

Release files for c7n-autodoc 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for c7n-autodoc 0.3
File Size Uploaded Provenance Actions
c7n_autodoc-0.3.tar.gz 2.5 kB Without provenance Details for c7n_autodoc-0.3.tar.gz

Release files / c7n_autodoc-0.3.tar.gz

Download URL c7n_autodoc-0.3.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9abd335627f24b5a1289ec549671e384952a472cd0273f2e9aaa620d4227e0f5
BLAKE2b-256 checksum
How to use checksums
d6aaa45a1b42fa11fb6244cfab811ee7c5f99b30a88dcd4d8e4fd71b39cb998b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

Security for c7n-autodoc 0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page