Skip to content

Commit

Permalink
[MERGE] Merge branches 'feature-70-fix', 'feature-bandit' and 'featur…
Browse files Browse the repository at this point in the history
…e-67-fix'

* PR #71 (feature-70-fix):
  [REGRESSION] fix for typo in setup.py 🙉
  [PATCH] Applied changes as disscussed in review (- WIP #71 -)
  [PATCH] Improves on fix by using function to practice the D.R.Y. principle (- WIP #71 -)
  [STYLE] Improved input checking durring bootstrap (- WIP #70 -)

* PR #68 (feature-bandit):
  Update .github/workflows/bandit.yml to test auto-fixes
  Update .github/workflows/bandit.yml to point at own fork
  Update bandit.yml
  Create bandit.yml

* PR #69 (feature-67-fix):
  [FIX] Stability fix for error handling (- WIP #67 -)

Changes in file .github/workflows/bandit.yml:
 - New workflow to bandit scan the repo.

Changes in file multicast/__main__.py:
 def doStep(self, *args):
  - fix for error handling by simplifying use of `Exception.args`

Changes in file setup.py:
 def readFile(filename):
  - stability and security improvements to bootstrapping.
  • Loading branch information
reactive-firewall committed Sep 9, 2024
3 parents 59c80be + 76836ac + 0a71dac commit 61afa26
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Bandit is a security linter designed to find common security issues in Python code.
# This action will run Bandit on your codebase.
# The results of the scan will be found under the Security tab of your repository.

# https://github.com/marketplace/actions/bandit-scan is ISC licensed, by abirismyname
# https://pypi.org/project/bandit/ is Apache v2.0 licensed, by PyCQA

name: Bandit
on:
push:
branches: [ "master", "stable", feature-*, HOTFIX-* ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]

permissions: {}

jobs:
bandit:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bandit Scan
uses: reactive-firewall/python-bandit-scan@v2.1
with: # optional arguments
# exit with 0, even with results found
exit_zero: true # optional, default is DEFAULT
# Github token of the repository (automatically created by Github)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information.
# File or directory to run bandit on
path: "." # optional, default is .
# Report only issues of a given severity level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything)
level: high # optional, default is UNDEFINED
# Report only issues of a given confidence level or higher. Can be LOW, MEDIUM or HIGH. Default is UNDEFINED (everything)
confidence: high # optional, default is UNDEFINED
# comma-separated list of paths (glob patterns supported) to exclude from scan (note that these are in addition to the excluded paths provided in the config file) (default: .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg)
# excluded_paths: # optional, default is DEFAULT
# comma-separated list of test IDs to skip
# skips: # optional, default is DEFAULT
# path to a .bandit file that supplies command line arguments
# ini_path: # optional, default is DEFAULT

2 changes: 1 addition & 1 deletion multicast/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def doStep(self, *args):
if (sys.stdout.isatty()): # pragma: no cover
print(w)
print(str(inerr))
print(str(inerr.args()))
print(str(inerr.args))
del inerr
__EXIT_MSG = (2, "NoOp")
except BaseException: # pragma: no branch
Expand Down

0 comments on commit 61afa26

Please sign in to comment.