Skip to content

Conversation

@pieterge
Copy link

Refactor and cleanup

pieterge and others added 30 commits December 22, 2022 17:09
2. Added Trivy to the default list of scans in __init__.py
3. Made the safety scan more robust, so it can handle not finding the requirments.txt better.
2. Add path to runAllPlugins() __init__.py
TODO: integrate parsable path to individual plugins.py
2. Add path to runAllPlugins() __init__.py
TODO: integrate parsable path to individual plugins.py
2. Added Flake8-JSON library to get JSON output from Flake8
2. Resolved issues with how trivy returns scanning results. It does not always contain a title. Build a check that parses empty string when this is the case.
3. Added Levelmapping for Unkown severity issues for trivy.
4. Refactored concatenations of strings to integrated f-strings.
5. Resolved issue with scanning results. Format is different for secret scanning.
2. Refactored path handling to always use absolute path.
2. Cleaning up todo
…ingfull output from Black to annotate within a PR
2. Generated Sphinx Documentation
3. Migrated old documentation to new documentation
2. Updated the issues with the menu
3. Added settings for the RTD Sphinx theme for fixating the navigation
4. Added titles to the menu
5. Added Logo's to the theme
6. Cleaned up the Extensions of Sphinx
7. Debugged issues when renders by fixing docutils to a particular version.

Some things that I have forgotten.
added trivy installation
1. tweaking dependencies and narrowing search path for performance.
pieterge and others added 27 commits December 29, 2022 15:59
# Conflicts:
#	.github/workflows/simplesecurity.yml
chore: pre-commit autoupdate
…ingfull output for the annotations within the PR. Updates pyproject.toml and poetry.lock accordingly.
…encies)

2. Updating Sphinx documentation to include new plugins (isort, mypy)
…t generic

- Touched up the docstrings for the return statements as they were incorrect and inconsistent
- Touched up the gitignore file as requested in review
- changed reference of linenrs to line_nrs to improve readability. The original review mentioned level.py, but there was no mention of this variable, so I have replaced the mentions throughout the project.
- Renamed dlint to flake8 and removed the DUO options as these are no…
* testing annotations in the CI pipeline

* testing annotations in the CI pipeline take2

* using flags properly

* removing \ linebrakes

* changing path to string and adding templating braces

* Changing ENV variable GITHUB_REF

* Cast scan_path to string

* changing reference to path

* try again with vanilla period

* assertion issues, testing..

* syntax isues

* syntax issues

* testing more explicit dir as argparse is defaulting to None value

* making a string of dir

* using env variable

* reproducing old example

* does this work with everything on the same line?

* does this work with everything on the same line? adjusting the configured version

* Changing yaml to folded style to support linebraking

* removing debug print out and adding findings object to annotation function call

* Changing CI to be triggered only in pull request. Duplicated non-commenting version for pulls

* clean up

* removing whitespaces

* Adding annotations function

* referencing the findings dict

* updating variables for annotations

* updating annotations function

* eliminating github_repository arg

* updating arg for annotations

* importing click into project

* updating the flags in the pr workflow

* Adding new flags to be used in workflow

* removing spaces

* adding check run

* fixing repo url

* adding a path to the annotations

* Extaction info scan from findings and building annotations

* Updating assertions

* testing payload

* Adding print statements for debug

* commenting out the click stuff

* typo!

* debug print statements

* debug print statements

* debug print statements

* debug print statements

* debug print statements

* creating array of annotations by wrapping it in a list

* converting dict to json

* converting dict to json

* Adding print statements for debuggin

* Matching dummy payload with github documentation

* Matching dummy payload

* Trying a different json

* updating json

* Adding headers to the dummy payload for testing

* Adjusting dummy payload

* Adjusting dummy payload

* Changing the Accept value

* Changin the format we patch a request

* Adding print for debugging

* Adding print for debugging

* fixing run_id

* fixing run_id

* fixing dummy payload

* fixing dummy payload

* testing annotations with findings payload

* printing patch request content

* Converting absolute path into relative path

* Creating a function to deal with paths

* Fixing paths function

* Fixing paths function

* Fixing paths function

* Fixing paths function

* Testing payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Testing scan payload

* Cleaning code

* Adding explanation comments

* Fixing spaces

* Modularizing GitHub Annotations.

* Modularizing GitHub Annotations.

* Modularizing GitHub Annotations.

* Modularizing GitHub Annotations.

* Modularizing GitHub Annotations.

* Modularizing GitHub Annotations.

* Improved logging

* Improved logging

* adding comments

* Improved logging

* Improved logging

* Correctin post comment function

* Correcting the post comment function

* Improved logging

* Improved logging

* Improved logging

* Improved logging

* Improved logging

* Improved logging

* Improved logging

* Improved logging

* Sending dummy comment

* changing patch request for post

* using scan result to post comment

* Parsing comment as string

* pushing last changes

---------

Co-authored-by: Pieter Geelen <pieter.geelen@keelvar.com>
- reformatting with black
- configuring conf.py from sphinx to document private functions too
- Regenerating rst files with autodoc
- Reformatted workflow to ensure that the _search_check_suite function gets all parameters before handling other consecutive steps.
- Black
- Added Assertions
- Added requests types to pyproject.toml
- removed other dependencies from pyproject.toml
@pieterge pieterge closed this Feb 20, 2023
@pieterge pieterge deleted the feature/ENG-5107_cleaning_up branch February 20, 2023 16:26
@pieterge
Copy link
Author

Sorry, this was by mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants