Skip to content

Commit

Permalink
feat: add test case for Command Injection Attack
Browse files Browse the repository at this point in the history
add test case for  Command Injection Attack
  • Loading branch information
DuLinRain authored Jan 26, 2021
1 parent 5279786 commit 49459d4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,12 @@ describe('test webpack and webpackxxx', () => {
});
expect(version).to.be.equal(null);
}).timeout(10 * 1000);
});

// test defence attack
it('test defence Command Injection Attack', () => {
const version = getVersion('get-npm-package-version; echo hehe; npm view get-npm-package-version', {
timeout: 100
});
expect(version).to.be.equal(null);
}).timeout(10 * 1000);
});

0 comments on commit 49459d4

Please sign in to comment.