
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Welcome to TookeUtils!
In this version, this toolkit allows the generation, validation and formating of CPF's and CNPJ's. For now, the use is exclusive to Brazil.
Add this line to your application's Gemfile:
gem 'tooke_utils'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tooke_utils
Generate a valid CPF:
$ cpf = TookeUtils::CPF.generate # Generates a valid CPF like "267.573.018-14"
Check if 'cpf' is valid:
$ cpf = "267.573.018-14"
$ TookeUtils::CPF.is_valid? cpf # True
Apply a valid mask to cpf:
$ cpf = "26757301814"
$ TookeUtils::CPF.mask cpf # Results in "267.573.018-14"
Generate a valid CNPJ:
$ cnpj = TookeUtils::CNPJ.generate # Generates a valid CNPJ like "41.737.186/0001-43"
Check if 'cnpj' is valid:
$ cnpj = "41737186000143"
$ TookeUtils::CNPJ.is_valid? cnpj # True
Apply a valid mask to cnpj:
$ cnpj = "41737186000143"
$ TookeUtils::CNPJ.mask cnpj # Results in "41.737.186/0001-43"
Bug reports and pull requests are welcome on GitHub at https://github.com/renatokano/tooke_utils.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that tooke_utils 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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.