Skip to content

ci: run the dependency graph submission before the CBOM step - #518

Merged
n1ckl0sk0rtge merged 1 commit into
mainfrom
fix/depgraph-eacces
Aug 21, 2026
Merged

ci: run the dependency graph submission before the CBOM step#518
n1ckl0sk0rtge merged 1 commit into
mainfrom
fix/depgraph-eacces

Conversation

@n1ckl0sk0rtge

Copy link
Copy Markdown
Contributor

What

Moves the Update dependency graph step so it runs right after the build and the clean-tree check, before the Create CBOM step.

Why

The step was skipped on pull requests, so #515 went green and then the first run on main failed:

Error: EACCES: permission denied, scandir
'/home/runner/work/sonar-cryptography/sonar-cryptography/76d3.../1508...'

The Create CBOM step is a Docker action. It runs as root with the workspace mounted at /github/workspace, and the Sonar Java analyzer inside it leaves temp folders in the workspace. Those folders belong to root, so the runner user cannot read them.

The dependency submission action walks the whole workspace to collect its depgraph files. It reached one of those root-owned folders and stopped with EACCES.

The fix

Run it before the CBOM step, while the workspace is still clean. Nothing else depends on the order:

  • it still runs after the check that the build left the working tree clean,
  • it only writes maven-dependency-submission-action-depgraph.json into target/, which is ignored,
  • the CBOM step does not use the dependency graph.

Testing

The step stays skipped on pull requests (it needs the main branch to submit a snapshot), so CI here cannot prove it. The next push to main is the real test.

The first run on main failed:

  Error: EACCES: permission denied, scandir
  '/home/runner/work/sonar-cryptography/sonar-cryptography/76d3.../1508...'

The CBOM step is a Docker action. It runs as root with the workspace
mounted, and the Sonar Java analyzer inside it leaves temp folders in the
workspace. Those folders belong to root and the runner user cannot read
them. The dependency submission action walks the whole workspace to find
its depgraph files, hits such a folder, and stops.

Running it before the CBOM step means it walks a clean workspace. Nothing
else depends on the order. It still runs after the clean-tree check, and
it only writes into target/, which is ignored.
@n1ckl0sk0rtge
n1ckl0sk0rtge requested a review from a team as a code owner August 21, 2026 07:42
@n1ckl0sk0rtge
n1ckl0sk0rtge merged commit 0659204 into main Aug 21, 2026
1 of 2 checks passed
@n1ckl0sk0rtge
n1ckl0sk0rtge deleted the fix/depgraph-eacces branch August 21, 2026 07:43
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

Successfully merging this pull request may close these issues.

1 participant