Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Support GitHub dependencies review action/api #879

Closed

Description

@hfhbd

Currently, the dependency submission is called in the Post step, not directly after the execution of Gradle. This is incompatible with the https://github.com/actions/dependency-review-action, which validates the submitted dependencies (from a PR) and will fail your build, eg if you submit vulnerabilities in the PR. The review action needs to be run after Gradle and after the submission of dependencies.

Activity

  1. hfhbd commented on Sep 9, 2023

    @hfhbd
    Author

    Hm, don't know if this is a GitHub issue, but the workaround to run the review action in another job didn't work:

      reviewDependencies:
        runs-on: ubuntu-latest
        needs:
          - build
        if: github.event_name == 'pull_request'
        steps:
          - uses: actions/dependency-review-action@v3
            with:
              retry-on-snapshot-warnings: true

    https://github.com/hfhbd/ComposeTodo/blob/603a57e66752a8f2f7602a32f2fd657053a77437/.github/workflows/CI.yml

    Update: This feature isn't yet implemented according to the issue tracker: actions/dependency-review-action#545, but the docs already mention it: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#best-practices-for-using-the-dependency-review-api-and-the-dependency-submission-api-together

    Alternative: gradle-build-action could call the GitHub review REST api too (or via opt-in).

  2. changed the title [-]Upload dependency submission after Gradle run[/-] [+]Support GitHub dependencies review action/api[/+] on Sep 9, 2023
  3. bigdaz commented on Sep 11, 2023

    @bigdaz
    Member

    Thanks for trying this out. The action was never tested with the dependency-review-action, since it wasn't compatible with Dependency Submission at the time.

    It looks like #882 will address the underlying issue. I'll leave this open until we can confirm that things are working.

  4. modified the milestones: 2.8.1, 2.9.0 on Sep 21, 2023
  5. self-assigned this
    on Sep 25, 2023
  6. bigdaz commented on Sep 26, 2023

    @bigdaz
    Member

    @hfhbd A fix for this issue has been added to the main branch. It would be helpful if you could test it out: you can do this by referencing gradle/gradle-build-action@main in your workflow.

  7. hfhbd commented on Sep 27, 2023

    @hfhbd
    Author
  8. bigdaz commented on Sep 29, 2023

    @bigdaz
    Member

    Thanks for checking. I'll release v2.9.0 shortly with this fix.

  9. bigdaz commented on Oct 1, 2023

    @bigdaz
    Member

    @hfhbd You should be able to switch back to v2, since v2.9.0 now includes this fix.

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions