-
Notifications
You must be signed in to change notification settings - Fork 15
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
licensing - total dependency graph 0 on pull-request workflow #54
Comments
@eidottermihi thank you for raising this issue, can you please confirm you have enabled GitHub Advanced Security on this repository (api used)? I just checked and if there is an error getting the diff list, we just return a blank list of dependencies. I'm about to add better logging to this so an end user can see the issues. |
@GeekMasher thanks for looking into this issue!
I did not find a specific setting for "GitHub Advanced Security" in repo settings, I suspect "Dependency graph" is needed? This is enabled. Maybe this is a problem on pull request workflows because the GITHUB_TOKEN maybe has no sufficient rights? However some error handling or logging would be nice, as you mentioned ;) |
@eidottermihi can you try and update the permissions to include permissions:
contents: read
security-events: read https://github.com/it-at-m/appswitcher-vue/actions/runs/5711495958/workflow#L13 Getting the dependencies from the API for Pull Requests requires access to There will be 2 things I'll work on to make this better:
|
I have created this discussion for now to help with this #56 |
@GeekMasher I added the permission (see https://github.com/it-at-m/appswitcher-vue/pull/74/files ) - the Action then reported So still looks to me as only "changed" dependencies are analyzed? This would be fine IMHO. https://github.com/it-at-m/appswitcher-vue/actions/runs/5718094968/job/15493206133 |
@eidottermihi You are correct, the Glad to see it's working now, this will show warnings next time when the feature / permissions are missing. |
Describe the bug
When the policy-is-code Action is run on a pull-request (scanning the non-default branch), License checking does not work because the dependency graph includes
0
dependencies.When the action is run on the default branch, License checking works.
To Reproduce
Workflow
Policy:
Open a PR and check the output of the action.
Expected behavior
Dependency Graph should be calculated with >0 dependencies.
Screenshots
action on PR (see https://github.com/it-at-m/appswitcher-vue/actions/runs/5711495958/job/15473216682)
action on main branch (see https://github.com/it-at-m/appswitcher-vue/actions/runs/5711336691/job/15472815170)
Additional context
I noticed Dependencies from Pull Request in the action log - does this mean the scan on a PR detects "changed dependencies" and therefore just scans these dependencies?
The text was updated successfully, but these errors were encountered: