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.
shift-fuzzer
Advanced tools
This module provides a fuzzer for a Shift format AST.
npm install shift-fuzzer
import fuzzProgram, {FuzzerState, fuzzFunctionDeclaration} from "shift-fuzzer";
import render from "shift-codegen";
// generate random program
let randomProgramAst = fuzzProgram();
let randomProgram = render(randomProgramAst);
console.log(randomProgram);
// generate random FunctionDeclaration
let randomFunctionAst = fuzzFunctionDeclaration(new FuzzerState({maxDepth: 7}));
let randomFunction = render(randomFunctionAst);
console.log(randomFunction);
// generate random program from a seed
const RNG_SEED = 0xBADBE1BE1;
let prng =
(function(state){
return function nextDouble() {
// implementation left as an exercise for the reader
};
}(RNG_SEED));
let seededRandomProgramAst = fuzzProgram(new FuzzerState({rng: prng, maxDepth: 7}));
let seededRandomProgram = render(seededRandomProgramAst);
console.log(seededRandomProgram);
npm install
.npm run build && npm test
.npm run build && npm test
.Copyright 2014 Shape Security, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
FAQs
generate random valid Shift format ASTs
The npm package shift-fuzzer receives a total of 1,269 weekly downloads. As such, shift-fuzzer popularity was classified as popular.
We found that shift-fuzzer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.