Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
TOCBot is a Table of Content (TOC) creation robot. It works by reading a markdown file and identifying all of the headers and creating a table of contents based on those headers.
Default it includes all levels (# = level 1, ## = level 2, etc), and will include headers up to 5 levels deep.
It will insert the table of contents between the separators that are placed in the file. The default separator is .
There must be TWO separators, one to open the table of contents and one to close it.
TOCBot will also add links above each header in order to make the Table of Contents clickable.
Installing TOCBot is very simple, just execute the following command.
gem install tocbot
Option | Purpose | Default Value |
---|---|---|
-h or --help | Show the help message | N/A |
-d or --depth | How many levels deep to add to the TOC. | 5 |
-f or --filename | The name of the file to process. | README.md |
-l or --level | The level of heading to start with. | 1 |
-s or --separator | The separator used to show where to insert the TOC. | <!--TOCBot--> |
You can execute TOCBot by simple running
tocbot
Start with level 2 headers (exclude all level 1 headers), and only include 3 levels of headers.
tocbot -s 2 -d 3
The depth is measures from the start so the above example will include header levels 2, 3 & 4.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will
create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
For local testing make sure that you run bundle exec rspec spec
and then rake install
to install the gem locally.
For further information please refer to the contributing documentation.
FAQs
Unknown package
We found that tocbot 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.