[StepSecurity] Apply security best practices #65
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: on_pull_request | |
| on: | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| reviewdog: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0 | |
| with: | |
| egress-policy: audit | |
| - name: Install Requirements | |
| run: | | |
| mkdir -p $HOME/bin | |
| curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b $HOME/bin | |
| echo "$HOME/bin" >> $GITHUB_PATH | |
| python3 -m pip install setuptools | |
| python3 -m pip install pylint | |
| python3 -m pip install netapp-ontap | |
| - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
| - name: Run reviewdog | |
| env: | |
| REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cd examples; python3 -m pylint python_client_library | reviewdog -reporter=github-pr-check -diff="git diff master" -efm="%f:%l:%c: %m" |