Welcome and Thanks your suggestion! we ready for accept grateful idea. Just throw your idea in the form of pull requests on GitHub. Let's contribute and be a cumulus family!
- node v14.16^
- yarn v1.22^
npm install
yarn install
If you want to testing your version. you can just fork this repository and install your test project like belows:
npm install https://github.com/path/to/repo
yarn add https://github.com/path/to/repo
If you found new weakness logic then add file to ./src/weakness/{name}.js
- each files on weakness directory are for finding each weakness.
- also the file name will be report type name on cumulus service.
For a case study, when you want to writing a logic about CSRF, create csrf.js
:
class CSRF { // set class name as upper camel case
checkString(data) {
let isDetected = false;
// TODO something to write for detection logic
return isDetected; // must to be return boolean type
}
}
module.exports = new CSRF();
If you want to contribute to exsited weakness logic, you can touch on middle of weakness class code:
class Xss {
checkString(data) {
let isDetected = false;
const regExp = /<|>|<|>|&|"|'/;
isDetected = regExp.test(data);
// TODO something to write for improve logic
return isDetected;
}
// NOTE or you can add new function like `checkType(data)`
}
module.exports = new Xss();
Any nontrivial fixes/features should include tests. we have a test folder.
You can write test code, about weakness logic is in weakness.test.js
, the others are in core.test.js
, also can suggest new kind of test code. please reference ./test.
Don't forget to add test code when you add new logic for weakness!
Running tests works:
yarn test
Note: can triggering to test for only *.test.js
.
Linting whole codes:
yarn lint
Note: we adopt eslint for javascript linting.
- We adopt semver as versioning.
- We adopt Git Flow branch strategy.
When contributing to the codebase, please note:
- Non-trivial PRs will not be accepted without tests (see above).
- Please do not bump version numbers yourself.
- Please use template as much as possible
If you have found a bug then raise an issue on the cumulus repo: https://github.com/tophat-cloud/cumulus/issues
Its worth checking to see if its already been reported, and including as much information as you can to help us diagnose your problem.
If you have a question or problem relating to using Cumulus then you can contact to Email.
Or please visit user group on Discord
These steps are only relevant to Cumulus employees when preparing and publishing a new SDK release.
- Determine what version will be released (we use semver).
- Update CHANGELOG.md to add an entry for the next release number and a list of 3. changes since the last release.
- Run the Prepare Release workflow.
- A new issue should appear in https://github.com/tophat-cloud/cumulus/issues.
- Ask a member of the @tophat-cloud team to approve the release.