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

The audit-tool deletes any tmp and output directory in the directory where it is run #104

Open
fgiloux opened this issue Dec 14, 2021 · 1 comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@fgiloux
Copy link
Contributor

fgiloux commented Dec 14, 2021

Once installed the audit-tool is a binary and can be run from any directory. If there is a tmp or output directory where it is run they will be wiped out without further notice:

audit/pkg/helpers.go

Lines 150 to 155 in 65771ff

func GenerateTemporaryDirs() {
command := exec.Command("rm", "-rf", "tmp")
_, _ = RunCommand(command)
command = exec.Command("rm", "-rf", "./output/")
_, _ = RunCommand(command)

A standard way of working with tmp files and directories is to have them created in the OS directory designed for the the purpose, often /tmp on Linux. An example can be found here:
https://gobyexample.com/temporary-files-and-directories

@camilamacedo86
Copy link
Collaborator

Hi @fgiloux,

It shows a nice but very low priority. Also, we might want to make it clear in the readme and warn when the commands to generate the reports are called.

@camilamacedo86 camilamacedo86 added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

2 participants