Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mizutani committed Aug 5, 2023
0 parents commit a601fa1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: audit
on:
workflow_dispatch:
push:
# schedule:
# - cron: "30 17 1 * *"
# - cron: '30 5,17 * * *'

jobs:
list-instances:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-1

- name: Dump instances
run: mkdir -p instances && aws ec2 describe-instances > instances/data.json
- name: Dump security groups
run: mkdir -p security_groups && aws ec2 describe-security-groups > security_groups/data.json
- uses: docker://openpolicyagent/opa:0.55.0
with:
args: "eval -f pretty -b ./ --fail-defined data.ex6.failed"
2 changes: 2 additions & 0 deletions policy.rego
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package ex6

0 comments on commit a601fa1

Please sign in to comment.