-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from pahrohfit/dev
dropped support for python 3.8, keeping current, linting and testing cleanups
- Loading branch information
Showing
54 changed files
with
1,339 additions
and
771 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Security Testing | ||
|
||
on: | ||
push: | ||
branches: [ master, dev ] | ||
pull_request: | ||
branches: [ master, dev ] | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
actions: read | ||
security-events: write # To upload sarif files | ||
|
||
jobs: | ||
security_checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
#cache: 'poetry' | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Load cached dotvenv | ||
id: cached-poetry-dotvenv | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/main.yml') }} | ||
|
||
- name: Load cached dotlocal | ||
id: cached-poetry-dotlocal | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.local | ||
key: dotlocal-${{ runner.os }}-${{ hashFiles('.github/workflows/main.yml') }} | ||
|
||
#---------------------------------------------- | ||
# install your root project, if required | ||
#---------------------------------------------- | ||
- name: Install library | ||
run: poetry install --no-interaction --sync | ||
|
||
#---------------------------------------------- | ||
# run security test suite | ||
#---------------------------------------------- | ||
- name: bandit security testing | ||
run: | | ||
poetry run bandit -r sanic_beskar/ | ||
- name: safety security testing | ||
run: | | ||
poetry run safety check | ||
- name: PyCharm Python Security Scanner | ||
uses: tonybaloney/pycharm-security@master | ||
|
||
- name: Run Trivy vulnerability scanner in repo mode | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: 'fs' | ||
ignore-unfixed: true | ||
format: 'sarif' | ||
output: 'trivy-results.sarif' | ||
severity: 'CRITICAL,HIGH' | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: 'trivy-results.sarif' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: tox validators | ||
|
||
on: | ||
push: | ||
branches: [ master, dev ] | ||
pull_request: | ||
branches: [ master, dev ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
tox_pre_commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
- name: Load cached dotvenv | ||
id: cached-poetry-dotvenv | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock')}}-${{ hashFiles('.github/workflows/main.yml') }} | ||
|
||
- name: Load cached dotlocal | ||
id: cached-poetry-dotlocal | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.local | ||
key: dotlocal-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.github/workflows/main.yml') }} | ||
|
||
#---------------------------------------------- | ||
# install your root project, if required | ||
#---------------------------------------------- | ||
- name: Show python | ||
run: python -V | ||
- name: Show poetry python | ||
run: poetry run python -V | ||
- name: Install library | ||
run: poetry install --no-interaction --sync | ||
|
||
#---------------------------------------------- | ||
# run test suite | ||
#---------------------------------------------- | ||
|
||
#- name: pre-commit checks | ||
# run: poetry run tox -e pre-commit -- -- --all-files -v | ||
|
||
- name: pre-commit | ||
uses: pre-commit/action@v3.0.1 |
Oops, something went wrong.