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

Support Windows runners #12

Closed
rossbeehler opened this issue Mar 9, 2022 · 5 comments
Closed

Support Windows runners #12

rossbeehler opened this issue Mar 9, 2022 · 5 comments

Comments

@rossbeehler
Copy link

Any chance we can get this to support Windows GitHub Actions runners? Since you're using a docker container action, I'm pretty sure it will only work on Linux (see https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action). The Azure Pipelines equivalent interacts with the dependency-check tool directly within the agent itself (downloading it, ensuring Java is present and setup well, etc.), which allows it to be used on both Windows and Linux.

If I'm mistaken and this should work, just let me know and I'll give it a shot. Otherwise, if I'm correct, you might want to update the readme.md to list this as a limitation.

@javixeneize
Copy link

@rossbeehler
Copy link
Author

Yeah, i get this error:

Run dependency-check/Dependency-Check_Action@main
  with:
    project: test
    path: .
    format: HTML
    args: --failOnCVSS 7 --enableRetired
Error: Container action is only supported on Linux

when running this workflow:

name: test-dependency-check

on:
  workflow_dispatch:

jobs:
  test-dependency-check:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2

      - name: Setup msbuild.exe
        uses: microsoft/[email protected]

      - name: NuGet restore
        run: nuget restore test.sln

      - name: Depcheck
        uses: dependency-check/Dependency-Check_Action@main
        id: Depcheck
        with:
          project: 'test'
          path: '.'
          format: 'HTML'    
          args: >
            --failOnCVSS 7
            --enableRetired

@javixeneize
Copy link

javixeneize commented Mar 9, 2022 via email

@rossbeehler
Copy link
Author

An alternative is to not use docker at all, but do what is found here: https://github.com/dependency-check/azuredevops/blob/main/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts

This is a heavy lift, and you may choose not to rewrite this action to match, but maybe the compromise is to modify the readme.md to at least note the limitation. Feel free to also use this issue to gauge interest in this functionality as well by leaving it open, etc.

@javixeneize
Copy link

javixeneize commented Mar 10, 2022 via email

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

No branches or pull requests

2 participants