341ed3b311
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much. - Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
33 lines
797 B
YAML
33 lines
797 B
YAML
name: Lint
|
|
on:
|
|
push:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lua:
|
|
name: Lua
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Dependencies
|
|
run: sudo apt-get -y update && sudo apt-get -y install lua-check
|
|
- name: Install example site
|
|
run: ln -s ./docs/site-example ./site
|
|
- name: Lint Lua code
|
|
run: make lint-lua
|
|
|
|
sh:
|
|
name: Shell
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Dependencies
|
|
run: sudo apt-get -y update && sudo apt-get -y install shellcheck
|
|
- name: Install example site
|
|
run: ln -s ./docs/site-example ./site
|
|
- name: Lint shell code
|
|
run: make lint-sh
|