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

Fix gitleaks configuration #950

Merged
merged 4 commits into from
Dec 8, 2020
Merged

Fix gitleaks configuration #950

merged 4 commits into from
Dec 8, 2020

Conversation

nopcoder
Copy link
Contributor

No description provided.

@nopcoder nopcoder requested a review from arielshaqed November 23, 2020 11:02
Copy link
Contributor

@arielshaqed arielshaqed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can understand why this might be better toml than before -- after all, I've never seen a good toml. And I can see whether it looks better on the action.
But I think we also need to fix the GitHub action: running gitleaks failed, the action succeeded. This should not have happened.
I'm approving because (I assume) it's better than what we had. But it does not fix the issue that the check failed and the action succeeded.

Copy link
Contributor

@arielshaqed arielshaqed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, still broken:

/usr/bin/docker run --name f44fd7608375460eaa98fda4347570b7_388d1a --label 179394 --workdir /github/workspace --rm -e GOROOT -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/lakeFS/lakeFS":"/github/workspace" 179394:f44fd7608375460eaa98fda4347570b7
fatal: ambiguous argument 'remotes/origin/master...remotes/origin/fix/gitleaks': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
running gitleaks v6.2.0 with the following command👇
gitleaks --pretty --repo-path=/github/workspace --verbose --redact --commit-from= --commit-to= --config=/github/workspace/.gitleaks.toml
INFO[2020-11-23T11:08:00Z] No leaks detected. 1 commits scanned in 553 microseconds 
✅ SUCCESS! Your code is good to go!
------------------------------------
👋 maintaining gitleaks takes a lot of work so consider sponsoring me or donating a little something
https://github.com/sponsors/zricethezav
https://www.paypal.me/zricethezav

@nopcoder
Copy link
Contributor Author

Sorry, still broken:

/usr/bin/docker run --name f44fd7608375460eaa98fda4347570b7_388d1a --label 179394 --workdir /github/workspace --rm -e GOROOT -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/lakeFS/lakeFS":"/github/workspace" 179394:f44fd7608375460eaa98fda4347570b7
fatal: ambiguous argument 'remotes/origin/master...remotes/origin/fix/gitleaks': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
running gitleaks v6.2.0 with the following command👇
gitleaks --pretty --repo-path=/github/workspace --verbose --redact --commit-from= --commit-to= --config=/github/workspace/.gitleaks.toml
INFO[2020-11-23T11:08:00Z] No leaks detected. 1 commits scanned in 553 microseconds 
✅ SUCCESS! Your code is good to go!
------------------------------------
👋 maintaining gitleaks takes a lot of work so consider sponsoring me or donating a little something
https://github.com/sponsors/zricethezav
https://www.paypal.me/zricethezav

The configuration file is fixed - but I guess you are talking about the invalid command line argument

@arielshaqed
Copy link
Contributor

Dunno if you know or if it's my turn to review, but there's still a fatal error:

fatal: ambiguous argument 'remotes/origin/master...remotes/origin/fix/gitleaks': unknown revision or path not in the working tree.

Even worse (to my mind) is that the action keeps succeeding even though it does not appear to work.

@nopcoder
Copy link
Contributor Author

Dunno if you know or if it's my turn to review, but there's still a fatal error:

fatal: ambiguous argument 'remotes/origin/master...remotes/origin/fix/gitleaks': unknown revision or path not in the working tree.

Even worse (to my mind) is that the action keeps succeeding even though it does not appear to work.

Still my turn... I think it is related to how the docker run command, used by git action, passing the commit information.
I'm running the same command locally without an issue.

@nopcoder nopcoder changed the title fix gitleaks configuration Fix gitleaks configuration Nov 24, 2020
@nopcoder nopcoder requested a review from arielshaqed December 2, 2020 15:21
@nopcoder
Copy link
Contributor Author

nopcoder commented Dec 2, 2020

can we approve this part - I will look for a better solution for the second one later. thanks.

Copy link
Contributor

@arielshaqed arielshaqed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's the best we can do for now.

Sorry for delay.

@nopcoder nopcoder merged commit 4ce4df1 into master Dec 8, 2020
@nopcoder nopcoder deleted the fix/gitleaks branch December 8, 2020 09:23
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.

2 participants