
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
api_cloudflare_client
Advanced tools
Cloudflare v4 API bindings for Node.js, providing a sourdough "BREAD" (Browse, Read, Edit, Add, and Delete) interface.
With these bindings, you'll get the following features:
Node.js v12 and greater are supported.
Set your account email address and API key. The API key can be found on the My Profile -> API Tokens page in the Cloudflare dashboard.
const cfInstance = require('api_cloudflare_client')({
email: 'you@example.com',
key: 'your Cloudflare API key'
});
import Cloudflare from 'api_cloudflare_client'
export default class CloudflareController {
constructor(private config: ConfigurationsController) {
this.config = config
}
async cloudflareInstance(): Promise<Cloudflare> {
const email = await this.config.get('cf.X-Auth-Email')
const key = await this.config.get('cf.X-Auth-Key')
// console.log(email, key)
if (typeof key !== 'string' || typeof email !== 'string')
throw new Error('Cloudflare credentials not found')
return new Cloudflare({email: email, key: key})
}
}
Create your token on the My Profile -> API Tokens page in the Cloudflare dashboard.
javascript
const cfInstance = require('api_cloudflare_client')({
token: 'your Cloudflare API token'
});
Every resource is accessed via your cfInstance instance:
// cf.{ RESOURCE_NAME }.{ METHOD_NAME }
Every resource method returns a promise, which can be chained or used with async/await.
cfInstance.zones.read('023e105f4ecef8ad9ca31a8372d0c353'
FAQs
CloudFlare API client
We found that api_cloudflare_client demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.