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.
@fimbul/heimdall
Advanced tools
Wotan module to use TSLint rules and formatters.
Make sure to also read the full documentation of all available modules.
Enable the use of TSLint rules and formatters.
npm install --save-dev @fimbul/wotan @fimbul/heimdall
# or
yarn add -D @fimbul/wotan @fimbul/heimdall
wotan -m @fimbul/heimdall -f code-frame
-f code-frame
refers to the TSLint core CodeFrameFormatter.
The -m @fimbul/heimdall
argument enables a hook that loads TSLint formatters if no Wotan formatter is found.
That means you cannot use a TSLint formatter when a builtin Wotan formatter with the same name exists.
Note that findings with severity suggestion
are reported as warning
through TSLint formatters.
To enable Heimdall, add the -m @fimbul/heimdall
argument when running wotan
from CLI.
wotan -m @fimbul/heimdall
Specifying TSLint rules in your .wotanrc.yaml
works as follows. Note that you need to specify a prefix for TSLint rules (tslint/
in this example)
---
rulesDirectories:
tslint: . # enables TSLint core rules
tcc: ./node_modules/tslint-consistent-codestyle/rules # enables custom TSLint rules provided by the package 'tslint-consistent-codestyle'. the path may be different for each package
rules:
no-unused-expression: error # without prefix this is a Wotan core rule
tslint/no-unused-expression: error # with prefix this refers to the TSLint core rule
tslint/semicolon: # TSLint core rule 'semicolon' with option 'always'
options: always
tcc/no-unused: error # 'no-unused' from tslint-consistent-codestyle
Since all paths in rulesDirectories
are treated as relative paths (i.e. not resolved using node module resolution), you need to provide the relative paths for node modules as shown above.
As an alternative you can resolve the module using require.resolve
. For this to work, you need to rename .wotanrc.yaml
to .wotanrc.js
and change the content as follows:
const path = require('path');
module.exports = {
rulesDirectories: {
tslint: '.' // enables TSLint core rules
tcc: path.dirname(require.resolve('tslint-consistent-codestyle')) // enables custom TSLint rules provided by the package 'tslint-consistent-codestyle'. the path may be different for each package
}
rules: {
'no-unused-expression': 'error' // without prefix this is a Wotan core rule
'tslint/no-unused-expression': 'error' // with prefix this refers to the TSLint core rule
'tslint/semicolon': { // TSLint core rule 'semicolon' with option 'always'
options: 'always'
}
'tcc/no-unused': 'error' // 'no-unused' from tslint-consistent-codestyle
}
}
If you want to always use this plugin module and don't want to add -m @fimbul/heimdall
to the CLI every time, you can add it to your .fimbullinter.yaml
file which contains default values for CLI arguments.
Use wotan save -m @fimbul/heimdall
to create of update .fimbullinter.yaml
. From now on Heimdall will always be loaded unless you override it with another -m
argument.
Why should you use Wotan to execute TSLint rules?
@fimbul/ve
), that are currently not supported by TSLint.-p
flag.Apache-2.0 © Klaus Meinhardt
v0.24.0
:tada: This release contains two major features: caching and code fixes in the LanguageService plugin.
:warning: Breaking Changes:
The changes in the LanguageService plugin require that you update the @fimbul/mithotyn
dependency and the fimbullinter.vscode-plugin
VSCode plugin if you were using one of them.
Features:
no-object-spread-of-iterable
warns about spreading an array into an objectno-implicit-tostring
warns about implicit string coercion of certain types--cache
enables caching for fast incremental linting. Read more about cachingFAQs
Wotan plugin to load and use TSLint rules and formatters
The npm package @fimbul/heimdall receives a total of 13 weekly downloads. As such, @fimbul/heimdall popularity was classified as not popular.
We found that @fimbul/heimdall demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
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.