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.
@hint/hint-no-http-redirects
Advanced tools
no-http-redirects
)no-http-redirects
checks if there are any HTTP redirects in the page
webhint
is analyzing.
Consider the following simplified description of what happens when a user requests a URL within a browser:
When a redirect occurs, 3.
contains the new URL the browser needs to
request, repeating the whole sequence of steps. DNS Lookup isn’t cheap,
neither is creating a TCP connection. The
impact of redirects is felt even more by mobile users, where the network
latency is usually higher.
As a rule of thumb, the more you can avoid redirects the better.
This hint checks:
webhint
has any redirect. E.g.:
http://www.example.com
--> http://example.com
http://example.com/script.js
--> https://example.com/script.js
and alerts if at least one is found.
webhint
that redirects to another oneBy default, no redirects are allowed but you can change this behavior.
The following hint configuration used in the .hintrc
file will allow 3 redirects for resources and 1 for the main URL:
{
"connector": {...},
"formatters": [...],
"hints": {
"no-http-redirects": ["error", {
"max-resource-redirects": 3,
"max-html-redirects": 1
}],
...
},
...
}
This package is installed automatically by webhint:
npm install hint --save-dev
To use it, activate it via the .hintrc
configuration file:
{
"connector": {...},
"formatters": [...],
"hints": {
"no-http-redirects": "error",
...
},
"parsers": [...],
...
}
Note: The recommended way of running webhint is as a devDependency
of
your project.
FAQs
hint for best practices related to HTTP redirects
The npm package @hint/hint-no-http-redirects receives a total of 16,179 weekly downloads. As such, @hint/hint-no-http-redirects popularity was classified as popular.
We found that @hint/hint-no-http-redirects demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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.