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.
amphtml-validator-extra
Advanced tools
Enhanced package of amphtml-validator.
It is possible to designate multiple URLs and file paths and verify them all together.
const amphtmlValidator = require('amphtml-validator-extra');
const urls = [
'https://example.com/article-01.html?amp',
'https://example.com/article-02.html?amp',
'https://example.com/article-03.html?amp'
];
amphtmlValidator.validateUrl(urls).then((result) => {
console.log(result);
});
// [
// status: 'PASS'
// errors: [...]
// ],
// [
// status: 'FAIL',
// errors: [...]
// ],
// ...
amphtmlValidator.validateHtml('<html amp>...</html>').then((result) => {
console.log(result);
});
Argment | Type | Description |
---|---|---|
html | string | AMP HTML sourde |
let urls = [
'https://example.com/article-01.html?amp',
'https://example.com/article-02.html?amp',
'https://example.com/article-03.html?amp'
];
amphtmlValidator.validateUrl(urls).then((result) => {
console.log(result);
});
Argment | Type | Description |
---|---|---|
urls | array or string | AMP Page URL. |
option.auth.user | string | Basic auth user name. |
option.auth.password | string | Basic auth password. |
option.progress | function | Progress callback function. |
let urls = [
'./test/article-01.html',
'./test/article-02.html',
'./test/article-03.html'
];
amphtmlValidator.validateFile(urls).then((result) => {
console.log(result);
});
Argment | Type | Description |
---|---|---|
urls | array or string | AMP Page URL. |
option.progress | function | Progress callback function. |
Progress callback function.
let urls = [
'https://example.com/article-01.html?amp',
'https://example.com/article-02.html?amp',
'https://example.com/article-03.html?amp'
];
let option = {
progress: (progress) => {
console.log(`${progress.index} / ${progress.max}`);
}
};
amphtmlValidator.validateUrl(urls, option).then((result) => {
console.log(result);
});
/*
* 1 / 3
* 2 / 3
* 3 / 3
*/
let urls = [
'https://example.com/auth/article-01.html?amp',
'https://example.com/auth/article-02.html?amp',
'https://example.com/auth/article-03.html?amp'
];
amphtmlValidator.validateUrl(urls, {
auth: {
user: 'username',
password: 'password'
}
}).then((result) => {
console.log(result);
});
FAQs
Enhanced package of amphtml-validator.
We found that amphtml-validator-extra 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.