Skip to content

Commit

Permalink
Add security checks (metoppv#1385)
Browse files Browse the repository at this point in the history
* Add safety and bandit to tests

* Add name to CONTRIBUTING.md
  • Loading branch information
dmentipl authored Dec 17, 2020
1 parent 8e3b114 commit e1e42c1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,25 @@ jobs:
run: black --check .
- name: pylint
run: pylint -j 0 -E --rcfile=etc/pylintrc improver improver_tests
Safety-Bandit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
id: cache
with:
path: /usr/share/miniconda/envs/improver
key: ${{ runner.os }}-conda-improver-${{ hashFiles('**/environment.yml') }}
restore-keys: ${{ runner.OS }}-conda-improver-
- name: conda env update
if: steps.cache.outputs.cache-hit != 'true'
run: |
source '/usr/share/miniconda/etc/profile.d/conda.sh'
conda env update -q --file environment.yml --name improver
conda list --export
- name: conda activate
run: echo "/usr/share/miniconda/envs/improver/bin" >>$GITHUB_PATH
- name: safety
run: safety check || true
- name: bandit
run: bandit -r improver || true
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ below:
* Simon Jackson (Met Office, UK)
* Caroline Jones (Met Office, UK)
* Bruno P. Kinoshita (NIWA, NZ)
* Daniel Mentiplay (Bureau of Meteorology, Australia)
* Stephen Moseley (Met Office, UK)
* Meabh NicGuidhir (Met Office, UK)
* Tim Pillinger (Met Office, UK)
Expand Down
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ dependencies:
- pysteps
- isort=4.3.21
- black=19.10b0
- bandit
- safety
- pip
- pip:
- od
Expand Down

0 comments on commit e1e42c1

Please sign in to comment.