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.
RAML does not enforce any style rules on how to consistently document an API; and that is good because not all projects will need the same rule enforcement. However, all APIs defined within a group of related APIs - such as many from a single entity or organization - should be consistent across each. APIs developed and documented by one team should be consistent with those by another team.
RAML Linter is a static analysis, linter-like, utility that will enforce rules (optionally) on the RAML created such that consistency can be more easily maintained.
git clone
npm install
npm run coverage
(optional)This project is trying to keep a high level of code coverage for unit tests. Contributtions are required to have unit tests provided to explain what is being added as well as prove compliance with use case.
The basis for rules is stored in src/defaults.json
and is the location to add new
rules as defaults. Projects using the linter to maintain
consistency will be able to provide a customization file which will override the
values in the defauls file.
npm
) ScriptsA number of helpful commands have been created in the npm scripts (package.json
).
npm run coverage
- runs all unit tests (Mocha) with code coverage (Istanbul)npm run doc
- generate documentation pages (JSDoc)npm run example
- runs a single example RAML document through the linternpm run hint
- static code analysis (JSHint)npm run lint
- static code analysis and code style linting (ESLint)npm run quality
- runs lint and coveragenpm test
- runs unit tests (Mocha)npm run test-w
- runs tests with additional flags, including --watch@TODO: example using the CLI
There are two ways to use the RAML Linter, as a: library, and as a command line utility. How you intend to use RAML Lint will dictate which way you use.
Using the library in code will provide the most flexibility; full access to how to handle errors as well as reading the full list of results for: 'error', 'warning', and 'info' log entries.
var ramllint = require('ramllint'),
ramlDocument = require('./path/to/api.raml');
ramllint(ramlDocument, function (results) {
// NOTE: results will only contain 'error' and will exclude 'warning' and 'info'
// to get an array of all log entries use: `ramllint.results()`
if (!results.length) {
// no errors, all rules are satisfied
} else {
// errors
}
});
This is a work in progress.
ramllint src/api.raml
Some information about the code is hosted on the gh-pages branch and served:
FAQs
RAML Lint
The npm package ramllint receives a total of 2 weekly downloads. As such, ramllint popularity was classified as not popular.
We found that ramllint 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.