Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scorecard #45

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.3
hooks:
- id: gitleaks
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shellcheck
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: "trailing-whitespace"
- id: "end-of-file-fixer"
exclude: '\.tf\.json$'
- id: "check-yaml"
args:
- "--unsafe"
- id: "check-executables-have-shebangs"
- id: "check-case-conflict"
- repo: local
hooks:
- id: code-style
name: Project Style Check
entry: npm run lint
language: system
types: [solidity]
- repo: local
hooks:
- id: unit-tests
name: Project Unit Tests
entry: npm run test
language: system
types: [ts, solidity]
53 changes: 53 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Contributing

## How to contribute to RSK

These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

### Code Reviews

Continued code reviews and audits are required for security. As such, we encourage interested security researchers to:

- Review our code, even if no contributions are planned.
- Publish their findings whichever way they choose, even if no particular bug or vulnerability was found. We can all learn from new sets of eyes and benefit from increased scrutiny.

### Code contributions

A code contribution process starts with someone identifying a need for writing code. If you're thinking about making your first contribution, we suggest you take a moment to get in touch and see how your idea fits in the development plan:

- Is it a bug in our [issue tracker](https://github.com/rsksmart/rsk-cli/issues)?
- Is it a novel idea that should be proposed and discussed first?

#### Review process

Once you know what to do, it is important that you provide a full description of the proposed changes. You can also send a draft pull request if you already have code to show.

We make use of GitHub Checks to ensure all changes meet a certain criteria:

1. The `main` branch is protected and only changeable through pull requests
2. All unit tests must pass
3. A project maintainer must approve the pull request
4. An authorized merger must merge the pull request

Since this is a security-sensitive project, we encourage everyone to be proactive and participate in the review process. To help collaboration we propose adhering to these conventions:

- **Request changes** only for correctness and security issues.
- **Comment** when leaving feedback without explicit approval or rejection. This is useful for design and implementation discussions.
- **Approve** when changes look good from a correctness, security, design and implementation standpoint.

All unit and integration tests pass without loss of coverage (e.g can't remove tests without writing equivalent or better ones).

All code paths on new code must be unit tested, including sensible edge cases and expected errors. Exceptions to this rule must be justified (i.e. highly similar paths already tested) in written form in the PR description.

In order to ease review, it is expected that the code diff is maintained to a minimum. This includes things like not changing unrelated files, not changing names or reordering code when there isn't an evident benefit.

When automatic code quality and security checks are ready in the pipeline for external PRs, then the PR must pass all PR validations including code coverage (Sonar), code smells (Sonar), Security advisories (Sonar, LGTM).

## Style guidelines

### Pull request etiquette

- Separate your changes into multiple commits
- If your pull request gets too big, try to split it
- Each commit should at least compile, and ideally pass all unit tests
- Avoid merge commits, and always rebase your changes on top of `main`
2 changes: 1 addition & 1 deletion SECURITY.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Rootstock team and community take security bugs in rootstock seriously. Besi

## Responsible Disclosure

For all security related issues, rsk-runes has two main points of contact. Reach us at <[email protected]> or use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/rsksmart/rsk-cli/security/advisories/new) tab.
For all security related issues, rsk-cli has two main points of contact. Reach us at <[email protected]> or use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/rsksmart/rsk-cli/security/advisories/new) tab.

The Rootstock team will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.

Expand Down
Loading