Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zachrundle committed Aug 11, 2024
1 parent 6ff24bf commit 6b25a14
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,18 @@
name: tfsec

on:
push:
branches:
- main
pull_request:

jobs:
tfsec:
name: tfsec
runs-on: ubuntu-latest

steps:
- name: Clone repo
uses: actions/checkout@v4

- name: Run tfsec
id: tfsec
run: |
tfsec > tfsec_output.txt
- name: Post tfsec results as PR comment
if: ${{ github.event_name == 'pull_request' }}
uses: actions/github-script@v6
uses: actions/checkout@master
- name: tfsec
uses: aquasecurity/[email protected]
with:
script: |
const fs = require('fs');
const output = fs.readFileSync('tfsec_output.txt', 'utf8');
const comment = `
## tfsec Scan Results
\`\`\`
${output}
\`\`\`
`;
github.rest.issues.createComment({
issue_number: github.context.issue.number,
owner: github.context.repo.owner,
repo: github.context.repo.repo,
body: comment,
});
soft_fail: true

0 comments on commit 6b25a14

Please sign in to comment.