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

Provide the inner exception of boefjes in the raw output #919

Closed
ammar92 opened this issue May 4, 2023 · 3 comments · Fixed by #936
Closed

Provide the inner exception of boefjes in the raw output #919

ammar92 opened this issue May 4, 2023 · 3 comments · Fixed by #936
Assignees
Labels
boefjes Issues related to boefjes enhancement New feature or request tech-debt

Comments

@ammar92
Copy link
Contributor

ammar92 commented May 4, 2023

Is your feature request related to a problem? Please describe.
When a plugin, specifically a boefje, fails, the raw output will display "Boefje failed" which is not very helpful. It would be nicer if a boefje throws an exception to have that exception message (and/ or stack trace) in the raw output instead. This also helps in detecting errors in boefjes and detecting breaking changes due to e.g. API or backend updates.

Describe the solution you'd like
On boefje execution failure provide:

  • inner exception message
  • traceback

Describe alternatives you've considered
An alternative would be to provide the logs in the raw output. But I think a nicer feature would be to write these to a log file on each run instead of raw output.

@ammar92 ammar92 added enhancement New feature or request boefjes Issues related to boefjes tech-debt labels May 4, 2023
@ammar92 ammar92 added this to KAT May 4, 2023
@github-project-automation github-project-automation bot moved this to Incoming features / Need assessment in KAT May 4, 2023
@Darwinkel
Copy link
Contributor

I think this is a necessary improvement. Especially with boefjes which only fail in some specific instances "Boefje failed" is not very helpful.

@underdarknl
Copy link
Contributor

Since our target-platform for running boefjes is something cleanly containerized/sandboxed, we have only two output channels available. The regular output, eg, a set of mimetyped rawfiles, and an error-channel. This maps to std-out and std-err.
The runner should see what the exit state of the job was, and add mime-types to both sets accordingly.
any file in the std-out set would be labeled with the boefjes name etc, and the same goes for the single output stream in std-err. Which should be given a mime-type denoting its an error.

Whatever is in that error-raw file is of no concern to the boefje itself, and should also not be python centered, as boefjes might be any other language. Python (and many other languages) will simply dump their stackstrace to std-err, which is exactly what we'd expect from a boefje crashing.

@Donnype
Copy link
Contributor

Donnype commented May 9, 2023

Something like this? #936

@Donnype Donnype moved this from Incoming features / Need assessment to Review in KAT May 9, 2023
@Donnype Donnype self-assigned this May 9, 2023
@Donnype Donnype moved this from Review to QA review / functional testing in KAT May 9, 2023
@TwistMeister TwistMeister moved this from QA review / functional testing to Ready for merge in KAT May 10, 2023
@github-project-automation github-project-automation bot moved this from Ready for merge to Done in KAT May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
boefjes Issues related to boefjes enhancement New feature or request tech-debt
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants