Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bandit #4405

Merged
merged 2 commits into from
Oct 5, 2021
Merged

Bandit #4405

merged 2 commits into from
Oct 5, 2021

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Sep 10, 2021

built on #4343

Add the Bandit static security analyser to GH actions.

@oliver-sanders oliver-sanders added small security security-related issues labels Sep 10, 2021
@oliver-sanders oliver-sanders added this to the cylc-8.0b3 milestone Sep 10, 2021
@oliver-sanders oliver-sanders self-assigned this Sep 10, 2021
Comment on lines +1 to +4
# NOTE: At present Bandit does *not* automatically source the .bandit
# configuration file, invoke like so:
# $ bandit -r --ini .bandit
# For development it may be convenient to use flake8-bandit.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️

.bandit Show resolved Hide resolved
@datamel
Copy link
Contributor

datamel commented Sep 12, 2021

Maybe it would be worth adding ZAP (https://www.zaproxy.org/) to the UI for dynamic OWASP analysis? From the looks of things its a little bit of an effort to get setup but I could check it out next training day if it would be helpful.

@kinow
Copy link
Member

kinow commented Sep 13, 2021

Maybe it would be worth adding ZAP (https://www.zaproxy.org/) to the UI for dynamic OWASP analysis? From the looks of things its a little bit of an effort to get setup but I could check it out next training day if it would be helpful.

I used it with Jenkins, we had it enabled for a Java project at NIWA for a while. Works well, but requires devs to create the tests and update when necessary, but it was ~4 years ago so things might be simpler (there might even exist a GH actions out there?). I'm keen to use it if others want it too.

@oliver-sanders
Copy link
Member Author

Yeah, create a cylc-ui/uis issue for it.

It might be possible to automate ZAP tests with Cypress which would make the process less manual (although it looks very fiddly at the moment).

@datamel
Copy link
Contributor

datamel commented Sep 13, 2021

Yeah, create a cylc-ui/uis issue for it.

It might be possible to automate ZAP tests with Cypress which would make the process less manual (although it looks very fiddly at the moment).

Will do, I know the implementation of it is not necessarily a quick job but possibly worth the time investment. I'll raise an issue.

@oliver-sanders
Copy link
Member Author

Rebased, note the flake8 tests will fail.

@hjoliver
Copy link
Member

Seems to be some genuine functional test failures.

@oliver-sanders
Copy link
Member Author

Found a rogue quote in an SQL statement, fixed and rebased, 🤞.

@oliver-sanders
Copy link
Member Author

Only running bandit on Python 3.7 because of PyCQA/bandit#658

Copy link
Contributor

@datamel datamel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to have. Thanks @oliver-sanders.
I have read the code and checked out the branch, bandit is running smoothly locally and remotely.

@oliver-sanders oliver-sanders merged commit 180cc8f into cylc:master Oct 5, 2021
@oliver-sanders oliver-sanders deleted the bandit1 branch October 5, 2021 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security security-related issues small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants