Skip to content

Commit

Permalink
Updated best practice to use github token and grant permission to cre…
Browse files Browse the repository at this point in the history
…ate issues
  • Loading branch information
tombui99 committed Dec 11, 2023
1 parent 0da1b1c commit 6d47681
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@v3
- name: CodeAuditor Workflow
uses: SSWConsulting/codeauditor-scan-site@1.0.0
with:
# Your CodeAuditor token
token: ${{ vars.CODEAUDITORTOKEN }}
token: ${{ secrets.CODEAUDITORTOKEN }}
# Your Scan URL
url: ${{ vars.SCANURL }}
# Your GitHub Token
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ This workflow action runs CodeAuditor scan on your website and creates new GitHu

| name | required | type | description |
| ------------ | --- | ------ | ----------- |
| GitHub_Token | yes | string | Your GitHub personal access token used to fetch data. Pass a secret by for instance using `${{ secrets.GH_TOKEN }}`. [Go here](https://github.com/settings/tokens/new?scopes=read:user) to generate one
| GitHub_Token | yes | string | Your repo default GitHub token i.e. using `${{ github.token }}`
| | | | Make sure you grant the token permission to create issue
| token | yes | string | Your personal CodeAuditor token that can be found on CodeAuditor's How It Works page
| url | yes | string | The url used on your CodeAuditor scan

Expand All @@ -60,15 +61,17 @@ name: Test CodeAuditor Workflow
jobs:
build:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@v3
- name: CodeAuditor Feedback Loop Workflow
uses: tombui99/codeauditor-github-workflow@v1.0.0
with:
# Your CodeAuditor token
token: ${{ vars.CODEAUDITORTOKEN }}
token: ${{ secrets.CODEAUDITORTOKEN }}
# Your Scan URL
url: ${{ vars.SCANURL }}
# Your GitHub Token
GitHub_Token: ${{secrets.GH_TOKEN}}
GitHub_Token: ${{ github.token }}
```

0 comments on commit 6d47681

Please sign in to comment.