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.
amp-site-validator
Advanced tools
If you publish your pages in AMP, you want to be sure any change does not affect your AMP performance. How? Setup a function generator that returns all URLS you want to validate and test them with the official Google's validator.
// 1. Import module and create a Validator
const createValidator = require('amp-site-validator');
const validator = createValidator();
// 2. Create your own url generator
const urlGenerator = function* (){
for(let i=1; i < 200; i++){
yield 'https://yourSite.com/page/'+i;
}
}
// 3. Set the number of parallel jobs and validate!
async function run(){
// This will fetch and validate 10 pages at the same time
const results = await validator(urlGenerator, 10);
console.log(results);
}
run();
const urlGenerator = function* (){
yield 'https://yourSite.com/page/1';
yield 'https://yourSite.com/page/2';
yield 'https://yourSite.com/page/3';
yield 'https://yourSite.com/page/4';
yield 'https://yourSite.com/page/5';
yield 'https://yourSite.com/page/6';
}
console.log('Valid pages : '+ results.filter( result => result.status === 'PASS').length)
console.log('Invalid pages : '+ results.filter( result => result.status !== 'PASS').length)
FAQs
Full site AMP Pages validator
The npm package amp-site-validator receives a total of 45 weekly downloads. As such, amp-site-validator popularity was classified as not popular.
We found that amp-site-validator 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.