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

New boefje containerized setup ignores stderr #3559

Open
zcrt opened this issue Sep 18, 2024 · 2 comments
Open

New boefje containerized setup ignores stderr #3559

zcrt opened this issue Sep 18, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@zcrt
Copy link
Contributor

zcrt commented Sep 18, 2024

Describe the bug
There are some boefjes using a subprocess call that captures both stderr and stdout. However, often stderr is ignored and only stdout is returned. This makes debugging a badly functioning boefje hard.

Expected behavior
Storing both stderr and stdout (and possibly even stdin) securely.

Examples

return [(set(), output.stdout)]

return [(set(), subprocess.run(cmd, capture_output=True).stdout.decode())]

@zcrt zcrt added the bug Something isn't working label Sep 18, 2024
@dekkers dekkers self-assigned this Sep 18, 2024
@underdarknl
Copy link
Contributor

Adding stderror to the output stream seems logical. however, that needs to be done on a 'per boefje' basis.
Returning stdout also makes better sense than parsing the output in the boefje itself, and then presenting a reworked version to the normalizer, as I'd rather keep the original output on file and work with that.
We do need to make sure that we can differentiate between the wanted (stdout) output, and the unwanted (stderror) output, as both these raw files will receive the boefje/$boefjename mimetype.

@underdarknl
Copy link
Contributor

related #1373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

3 participants