-
Notifications
You must be signed in to change notification settings - Fork 5
Change the scans to be pyansys scans #375
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
Draft
margalva
wants to merge
37
commits into
main
Choose a base branch
from
maint/scans
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
60ecd85
Change the scans to be pyansys scans
margalva 8d49092
Merge branch 'main' into maint/scans
margalva 802dcc8
Replace sbom generation action
margalva 660ef38
Merge from main
margalva 81a3176
Fix the name
margalva e4c1ce4
Stop upload at a previous step
margalva 0d3379f
Add vulnerability scan on dev version
margalva 0aac09c
Fix workflow
margalva 3fd0f37
Add logs for vulnerability
margalva 2bc481e
Address vulnerability scan results
margalva 77f5aac
Address vulnerability scan results
margalva df67a27
Add logs for vulnerability
margalva cfe1ed4
Fix syntax
margalva 5ab5996
Fix a couple issues
margalva 2d94873
Synatx fixes
margalva c767280
automatic upload
margalva ca97dea
Exclude bandit from security scanning
margalva 6d4bebc
Add bandit config file
margalva 6c7f60b
config for bandit
margalva 756043d
Fix path to yaml
margalva fa7a2ae
Try to deactivate
margalva db51442
Try to create our own safety scan
margalva d67fe83
first the new pipeline
margalva 792ccac
Add safety package in pipeline
margalva 593285c
fix the workflow - check out and build code
margalva 4582f3c
Remove ansys workflow in favor of public workflows
margalva 96d3dbb
Check that it can find security issues
margalva fc6f642
Make everything in a single workflow...
margalva 5a79505
go back to pyansys workflows
margalva 69e5f8a
Add scan for dev
margalva 689dc53
Show logs
margalva 3668a4c
add exclude from bandit
margalva 84e8749
Add nosec
margalva e9dbaa5
Add more exception
margalva e6cdc24
Remove errors on pickle
margalva d140a50
more bandit fixes
margalva 1d5a7a0
more bandit fixes
margalva File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,79 @@ | ||
name: Security Scan | ||
|
||
env: | ||
MAIN_PYTHON_VERSION: '3.13' | ||
PACKAGE_NAME: 'ansys-dynamicreporting-core' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- maint/* | ||
- release/* | ||
|
||
jobs: | ||
|
||
sbom: | ||
name: Generate SBOM | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
- name: Build wheelhouse | ||
uses: ansys/actions/build-wheelhouse@v10 | ||
with: | ||
library-name: ${{ env.PACKAGE_NAME }} | ||
operating-system: ubuntu-latest | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
- name: Install from wheelhouse | ||
run: python -m pip install --no-index --find-links=wheelhouse ${{ env.PACKAGE_NAME }} | ||
|
||
- name: Generate SBOM with Syft | ||
uses: anchore/[email protected] | ||
with: | ||
format: cyclonedx-json | ||
output-file: sbom.cyclonedx.json | ||
upload-artifact: false | ||
|
||
- name: Upload SBOM as artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.PACKAGE_NAME }}-sbom | ||
path: sbom.cyclonedx.json | ||
|
||
|
||
vulnerabilities: | ||
name: Vulnerabilities | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: PyAnsys Vulnerability check (on main) | ||
if: github.ref == 'refs/heads/main' | ||
uses: ansys/actions/[email protected] | ||
with: | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
python-package-name: ${{ env.PACKAGE_NAME }} | ||
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | ||
run-bandit: false | ||
hide-log: false | ||
|
||
- name: PyAnsys Vulnerability check (on dev) | ||
if: github.ref != 'refs/heads/main' | ||
uses: ansys/actions/[email protected] | ||
with: | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
python-package-name: ${{ env.PACKAGE_NAME }} | ||
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | ||
run-bandit: false | ||
dev-mode: true | ||
hide-log: false |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@margalva Any version beyond
0.6.19
will break powerpoint export. I have to do an upgrade in TFS before it can be upgraded hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viseshrp thanks, I'm still working on this PR, but we do need to upgrade the version due to security issues on the current version - see https://data.safetycli.com/vulnerabilities/CVE-2023-4863/62149/
Let me know if this is more work than a simple update on both TFS and here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it requires some refactoring/rewrite of small portions of the code.