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

"detected dubious ownership in repository" for a Foundry project #49

Closed
CodeSandwich opened this issue Feb 6, 2023 · 3 comments · Fixed by sambacha/slither-action#1
Closed

Comments

@CodeSandwich
Copy link

My CI suddenly started failing on Slither action:

[-] Installing dependencies from foundry.toml
Error: 
fatal: detected dubious ownership in repository at '/github/workspace'
To add an exception for this directory, call:

	git config --global --add safe.directory /github/workspace

I haven't upgraded anything (except Foundry, it keeps rolling) or changed any configuration.

I've tried adding a CI step:

run: git config --global --add safe.directory /github/workspace

and adding an actions/checkout parameter:

set-safe-directory: '/github/workspace'

None of these worked, the error keeps popping up.

A failing run: https://github.com/radicle-dev/drips-contracts/actions/runs/4102797360/jobs/7076195503

@CodeSandwich
Copy link
Author

A probable root cause: actions/runner#2033

Worked it around by adding --build-info to forge test that is run before running Slither and adding with: ignore-compile: true to the Slither action configuration.

@elopez
Copy link
Member

elopez commented Feb 9, 2023

Thanks for the report @CodeSandwich! That issue you linked could be the root case indeed.

I prepared a small change in #50 that should help with this issue, could you try it out and let me know if it helps? It should be enough to specify using: crytic/slither-action@dev-git-safe-workspace on your workflow to test it.

@elopez
Copy link
Member

elopez commented Feb 21, 2023

v0.3.0 was just released and contains this fix 👍

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 a pull request may close this issue.

2 participants