Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
An SEO Analyzer for Single Page Applications (SPAs) that provides comprehensive insights into SEO metrics, accessibility, performance, and best practices.
Install globally to use the CLI anywhere:
npm install -g seo-info
Run without installation
npx seo-info <url> [options]
Analyze a website by providing its URL
seo-info <url> [options]
Example
seo-info https://example.com --format html --output ./reports/example-report
CLI Options:
-c, --config
: Path to a configuration file.-0, --output
: Output path for the report (without extension).-f, --format
: Format of the generated report (json, html, pdf).-h, --help
: Display help information.Integrate the analyzer into your Node.js projects:
import { analyzeSEO } from 'seo-info';
(async () => {
const htmlContent = `
<!DOCTYPE html>
<html>
<head>
<title>Your SPA</title>
<meta name="description" content="Description of your SPA">
<!-- Other meta tags -->
</head>
<body>
<!-- Your SPA content -->
</body>
</html>
`;
const baseUrl = 'https://example.com'; // Replace with your base URL
const options = {
imageSizeLimit: 200 * 1024, // 200KB
timeout: 60000, // 60 seconds
reportFormat: 'html',
outputPath: './reports/seo-report',
};
try {
const seoResults = await analyzeSEO(htmlContent, baseUrl, options);
console.log('SEO analysis completed successfully.');
} catch (error) {
console.error('SEO analysis failed:', error.message);
}
})();
You can customize the analyzer using a configuration file using .seoinforc.
Create a .seoinforc file in JSON format in your project's root directory:
{
"imageSizeLimit": 150000,
"timeout": 60000,
"thresholds": {
"largeImageSize": 150000,
"totalJsSize": 750000,
"ssrContentLengthThreshold": 2000,
"lazyLoadDelay": 1500
},
"reportFormat": "html",
"outputPath": "./reports/seo-report"
}
Each compression operation returns statistics such as:
This project is licensed under the MIT License.
[1.0.1] - 2024-11-16
FAQs
An SEO Analyzer for Single Page Applications (SPAs)
We found that seo-info 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.