cloudformation-guard icon indicating copy to clipboard operation
cloudformation-guard copied to clipboard

[Enhancement] Provide GitHub action

Open thomasklinger1234 opened this issue 5 years ago • 2 comments

Is your feature request related to a problem? Please describe. We use GitHub actions a lot to ensure code style and compliance. A pre-built GitHub action would be awesome as it encapsulates running, configuration and installation of cfn-guard.

Describe the solution you'd like

The following configuration would be used in .github/workflows/cfn-guard.yml

---
name: pullrequest
on:
  pull_request:
    branches: [ main ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: aws-cloudformation/cloudformation-guard
        with:
          ruleset: "tools/cfn-guard/configuration/default.rules" # folder where rules reside
          templates: "cloudformation/*.template.yaml"

Open questions here:

  • how to check dynamic generated templates (e.g. by AWS CDK or other generators)?

Describe alternatives you've considered Using the pre-commit check from #22 and then a dedicated action for it.

thomasklinger1234 avatar Nov 05 '20 16:11 thomasklinger1234

This would be super powerful. We need to look into how exactly to vend these managed actions haven't done a whole lot of work with this side of GitHub actions.

johnttompkins avatar Dec 03 '20 00:12 johnttompkins

https://github.com/aws-cloudformation/cloudformation-guard/issues/49 should be done first for inline comments

PatMyron avatar Dec 03 '20 17:12 PatMyron