Skip to content

Commit

Permalink
feat: remove upload to dashboard (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobPasMue committed Apr 5, 2024
1 parent ec012f1 commit cfd60d4
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 319 deletions.
191 changes: 0 additions & 191 deletions _pyansys-dashboard-vulnerabilities-upload/action.yml

This file was deleted.

48 changes: 0 additions & 48 deletions check-vulnerabilities/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ description: |
being introduced by them on their feature branch (while no new advisories
are created).
.. note::
This action also allows you to upload the vulnerabilities detected to the
PyAnsys dashboard. This is done by setting the ``pyansys-dashboard-upload``
input to ``true``. However, this option is only available for the ``ansys``
and ``ansys-internal`` GitHub organizations. If your repository
is not part of these organizations, the action will not upload the
vulnerabilities to the PyAnsys dashboard.
In case we are running in ``dev-mode``, the upload to the PyAnsys dashboard
is disabled.
The following list of `safety`_ vulnerabilities are accepted:
Expand Down Expand Up @@ -100,7 +88,6 @@ inputs:
description: >
Whether to run or not this action in development mode. It will activate
by default the ``dry-run`` and ``exit-with-error-on-new-advisory`` flags.
Upload of information to the PyAnsys dashboard is disabled in dev-mode.
required: false
default: false
type: boolean
Expand Down Expand Up @@ -163,28 +150,6 @@ inputs:
required: false
type: string

pyansys-dashboard-upload:
description: >
Whether to upload the vulnerabilities to the PyAnsys dashboard.
By default, the vulnerabilities are not uploaded to the PyAnsys dashboard.
default: false
required: false
type: boolean

pyansys-dashboard-token:
description: >
Token with read permissions on the PyAnsys dashboard repository.
required: false
type: string

pyansys-dashboard-credentials:
description: >
Credentials to access the PyAnsys dashboard database. They
are available as a secret inside the ``ansys`` and ``ansys-internal``
organizations.
required: false
type: string

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -560,16 +525,3 @@ runs:
name: vulnerability-results
path: ./info_*.json
retention-days: 7

- name: "Upload to PyAnsys dashboard"
uses: ansys/actions/_pyansys-dashboard-vulnerabilities-upload@main
# Only upload if the flag is set to true and we are not in dev-mode
if: inputs.pyansys-dashboard-upload == 'true' && inputs.dev-mode == 'false'
with:
pyansys-dashboard-token: ${{ inputs.pyansys-dashboard-token }}
pyansys-dashboard-credentials: ${{ inputs.pyansys-dashboard-credentials }}
dry-run: ${{ inputs.dry-run }}
repository: ${{ env.DEPENDENCY_CHECK_REPOSITORY }}
safety-report: ${{ github.workspace }}/info_safety.json
bandit-report: ${{ github.workspace }}/info_bandit.json
hide-log: ${{ inputs.hide-log }}
4 changes: 0 additions & 4 deletions doc/source/migrations/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Development version
This is useful when you want to hide the vulnerabilities from the logs, but still want to fail the action if vulnerabilities are found.
- Avoid creating issues by default if vulnerabilities are found in the ``ansys/actions/check-vulnerabilities`` action.
- Create a changelog fragment file for each pull request using ``towncrier`` in the ``ansys/actions/doc-changelog`` action.
- Vulnerability advisories can now be uploaded to the PyAnsys Dashboard using the ``ansys/actions/check-vulnerabilities`` action
by setting the ``pyansys-dashboard-upload`` input to ``true``, together with the necessary credentials.

**Breaking changes:**

Expand All @@ -26,7 +24,6 @@ Development version
**Migration steps:**

- To set up your repository to use the ``ansys/actions/doc-changelog`` action, see the :ref:`docs_changelog_action_setup`.
- To upload vulnerability advisories to the PyAnsys Dashboard, see the :ref:`pyansys_dashboard_upload`.

Version ``v5``
--------------
Expand Down Expand Up @@ -82,4 +79,3 @@ Version ``v4``
:maxdepth: 3

docs-changelog-setup
pyansys-dashboard-upload
62 changes: 0 additions & 62 deletions doc/source/migrations/pyansys-dashboard-upload.rst

This file was deleted.

This file was deleted.

0 comments on commit cfd60d4

Please sign in to comment.