trufflesecurity / trufflehog

Find, verify, and analyze leaked credentials
https://trufflesecurity.com
GNU Affero General Public License v3.0
17.34k stars 1.72k forks source link

error": "cannot move binary (exit status 1)" #3290

Open jz543fm opened 2 months ago

jz543fm commented 2 months ago

TruffleHog Version

3.82.1

Trace Output

    What do you want to do?                     

     ( ) Scan a source using wizard             
     (β€’) Analyze a secret's permissions         
     ( ) View help docs                         
     ( ) View open-source project               
     ( ) Inquire about TruffleHog Enterprise    
     ( ) Quit                                   

2024-09-12T16:21:27+02:00   error   trufflehog  error occurred with trufflehog updater 🐷    {"error": "cannot move binary (exit status 1)"}
╰─cliβ”€βžœβ‡‰β―>➜ trufflehog filesystem ~/x --only-verified --trace
2024-09-12T16:34:22+02:00   error   trufflehog  error occurred with trufflehog updater 🐷    {"error": "cannot move binary (exit status 1)"}
╰─cliβ”€βžœβ‡‰β―>βœ— which trufflehog 
/usr/local/bin/trufflehog
╰─cliβ”€βžœβ‡‰β―>βœ— ls -lthra /usr/local/bin/trufflehog 
-rwxr-xr-x 1 root root 153M Sep 12 16:20 /usr/local/bin/trufflehog

Expected Behavior

It should work for scanning

Actual Behavior

Actually bin is problem

Environment

Additional Context

References

* #3256

On macOS Sonoma 14.6.1 I am using homebrew and I do not have any problems

jz543fm commented 2 months ago

In Docker Trufflehog in Ubuntu 20.04.06 LTS works

octaviovg commented 1 month ago

I had the same issue with the following setup:

I was working on Windows 11 I have a Python project in WSL I opened the Python project (located in WSL) using VSCode on Windows The program I ran uses subprocess.Popen() to execute the trufflehog command My VSCode terminal was running under the current (non-root) user I encountered the error: "cannot move binary (exit status 1)"

How I solved it: I logged into the VSCode terminal as root and reran the program. This resolved the issue.

I believe the problem was due to permission issues.

patsevanton commented 4 weeks ago

Same issue

pk27734 commented 3 weeks ago

Add --no-update as param to fix it.