Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@cspotcode/ansi-to-html
Advanced tools
CLI tool to convert ANSI colored text to an HTML file, with a few extra features to support my team's use-case.
CLI tool to convert ANSI colored text to an HTML file, with a few extra features to support my team's use-case.
We use it to generate pretty reports of subsets of automated CI tasks. Although CI servers are good at recording and visualizing build logs, sometimes it is helpful to upload the output of a single command separately as a build artifact for easier review.
There are other tools like this one. This tool has a few features they may not have:
#L123
-style like Github. Click any line, JS adds that line-number to the URL, you can copy a link to it.❯ ansi-to-html --help
Render ANSI console formatting into HTML
━━━ Usage ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$ ansi-to-html [input] [output]
━━━ Options ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
--theme #0 Specify color theme by name. Use --list-themes to see a list of all themes. Themes come from https://windowsterminalthemes.dev/ Default: MonokaiDimmed
--open-in-new-tab-link Add a link to the top of the page which will open the same file in a new browser tab. Useful when you know the report will be rendered in an iframe and you want to offer an easy way to link to it directly.
--no-per-line-anchors Add clickable anchors so you can click any line in the file and get a link to that line number. Useful for sharing a link to a specific line number in the log.
--list-themes Lists the names of all themes, then exits.
━━━ Examples ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Render from file to file
$ ansi-to-html command-log.txt command-log.html
Render from stdin to stdout
$ complex-command | ansi-to-html > output.html
Here is the output of git status
while I was working on this project:
❯ git -c color.status=always status | ansi-to-html > examples/git-status.html
FAQs
CLI tool to convert ANSI colored text to an HTML file, with a few extra features to support my team's use-case.
The npm package @cspotcode/ansi-to-html receives a total of 3 weekly downloads. As such, @cspotcode/ansi-to-html popularity was classified as not popular.
We found that @cspotcode/ansi-to-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.