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

feat: remove upload to dashboard #444

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -7,7 +7,7 @@
from one version of the actions to another, and other upstream dependencies that
have been updated.

Development version

Check warning on line 10 in doc/source/migrations/index.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/migrations/index.rst#L10

[Google.Headings] 'Development version' should use sentence-style capitalization.
Raw output
{"message": "[Google.Headings] 'Development version' should use sentence-style capitalization.", "location": {"path": "doc/source/migrations/index.rst", "range": {"start": {"line": 10, "column": 1}}}, "severity": "WARNING"}
-------------------

**New features:**
Expand All @@ -16,8 +16,6 @@
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 @@
**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 @@
: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.