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

update to latest bunyan #1

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

update to latest bunyan #1

wants to merge 24 commits into from

Conversation

nadavsinai
Copy link

No description provided.

trentm and others added 24 commits June 23, 2020 21:32
This was reported privately as:
    https://hackerone.com/reports/902739
    bunyan - RCE via insecure command formatting

After this change:
    % ./bin/bunyan -p "S'11;touch hacked ;'\\"
    bunyan: error: no matching PIDs found for "S'11;touch hacked ;'\"

With bunyan's self-trace logging to show the escaped command:
    % BUNYAN_SELF_TRACE=1 ./bin/bunyan -p "S'11;touch hacked ;'\\"
    [bunyan self-trace] exec cmd: "ps -A -o pid,command | grep '[S]'\\''11;touch hacked ;'\\''\\\\'"
    bunyan: error: no matching PIDs found for "S'11;touch hacked ;'\"
    [bunyan self-trace] cleanupAndExit(2, undefined)
    [bunyan self-trace] process.exit(2)

Before this change these would create a "hacked" file in the current dir.
Installing with `--no-optional` can reduce a bunyan 1.x install from ~3-4MB to ~450kB.
THis is a slight change in how `log.info(undefined, 'some message')`
is rendered by Bunyan, but that's been a fact since node v12.

nodejs/node#23162 was the relevant change.
…rcular refs

In nodejs/node#27685 (part of node v14), how
objects with circular references are stringified with `util.inspect` changed.
This change uses `os.EOL` for line endings instead of `\n`
This is useful for those of us using NodeJS on Windows where the easiest log reader is Notepad.exe
Fixes #589
This also:
- adds "files" to package.json which removes a lot of dev files
  from the published package
- adds a package-lock.json file for 'npm ci' usage
- fix more jsstyle issues with newer Perl
- drop windows testing for now until using node-tap that handles globs
Currently just tap v9 because that is the last major version of node-tap
that supports back to node v0.10.
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.

10 participants