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.
Simple library for interacting with the Cloudflare API.
gem install cfc
If you're installing for development/contribution, just clone the repository.
Once you've require
d the gem, you must then configure it with required credentials before you can use it. You can do
this by calling CFC::Config.configure
, as shown below. You must provide a valid API token for the gem to use in API
requests.
CFC::Config.configure do |config|
config.token = 'your_api_token_here'
end
Alternatively, you can authenticate with your API key and email address:
CFC::Config.configure do |config|
config.api_key = 'your_api_key_here'
config.api_email = 'your_email_here'
end
You can then use the library either by instantiating CFC::API
and using that class to send API requests directly,
or, you can use pre-provided objects in lib/objects/
, which represent a data type from the Cloudflare API and may
provide methods to perform common or simple tasks on those types. For instance, to list DNS records in all zones you
administer (assuming you've already configured the gem as above):
CFC::Zone.list.each do |zone|
puts zone.records
end
Or if you need to roll all of your current API tokens:
new_tokens = CFC::UserAPIToken.list.each do |token|
token.roll['result']
end
# Once you've rolled tokens, of course, your existing token won't work, so you
# probably want to update that.
CFC::Config.configure do |config|
config.token = new_tokens[0]
end
As with all Codidact projects, contributions are welcome and must adhere to the Codidact Code of Conduct. Please create an issue to discuss any major changes you propose to make, or if you think your changes may not be accepted for any reason—we'd always rather discuss something unnecessarily than have to reject someone's hard work.
This project is licensed under the terms of the MIT license, which may be found in the LICENSE file.
FAQs
Unknown package
We found that cfc 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.