
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
cloudflare4
Advanced tools
The Cloudflare4 module allows you to communicate with the CloudFlare V4 API from node.js in a promise friendly manner.
It also supports automatic request retries.
This module is published in NPM:
npm install cloudflare4 --save
The --save tells NPM to automatically add it to your package.json file
// Import a module
var CloudFlareAPI = require('cloudflare4');
// Create an instance with your API V4 credentials
var api = new CloudFlareAPI({email: 'email@domain.com', key: 'my_key'});
// Get things done
api.userFirewallAccessRuleGetAll().then(function (rules) {
console.log(rules);
});
new CloudFlareAPI({
email: 'email@domain.com',
key: 'my_key',
itemsPerPage: 100, // default=100
maxRetries: 5, // default=5
raw: false // default=false,
autoPagination: false, // default=false
autoPaginationConcurrency: 1 // default=1
});
you can pass pagination params into any method that has a body or query argument.
api.userFirewallAccessRuleGetAll({per_page: 1, page: 2}).then(function (rules) {
console.log(rules);
});
or with auto-pagination
api.userFirewallAccessRuleGetAll({auto_pagination: true, auto_pagination_concurrency: 1}).then(function (rules) {
console.log(rules);
});
Note: if you use auto_pagination for a GetAll the raw argument is no longer respected
if you set raw it will return the full response body including pagination details
api.userGet(true)
would return
{
result: {
id: 'dc19c3231tds452eb4ebc123d6eb4c99',
email: 'email@domain.com',
username: 'username',
first_name: 'Foo',
last_name: 'Bar',
telephone: '5555555555',
country: null,
zipcode: null,
two_factor_authentication_enabled: false,
two_factor_authentication_locked: false,
created_on: '2014-09-29T13:21:56.807670Z',
modified_on: '2015-10-04T00:02:50.855108Z',
organizations: null,
has_pro_zones: true,
has_business_zones: false,
has_enterprise_zones: false
},
success: true,
errors: [],
messages: []
}
and with raw set to false (the default), it would return
{
id: 'dc19c3231tds452eb4ebc123d6eb4c99',
email: 'email@domain.com',
username: 'username',
first_name: 'Foo',
last_name: 'Bar',
telephone: '5555555555',
country: null,
zipcode: null,
two_factor_authentication_enabled: false,
two_factor_authentication_locked: false,
created_on: '2014-09-29T13:21:56.807670Z',
modified_on: '2015-10-04T00:02:50.855108Z',
organizations: null,
has_pro_zones: true,
has_business_zones: false,
has_enterprise_zones: false
}
we use the debug module so you can debug the http requests by doing the following
DEBUG=http node myfile.js
also all methods enforce type checking so invalid usage would result in errors like this
All methods follow the official API documentation.
FAQs
CloudFlare V4 API wrapper
The npm package cloudflare4 receives a total of 159 weekly downloads. As such, cloudflare4 popularity was classified as not popular.
We found that cloudflare4 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.