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

first pass at security.md [SLT-250] #3205

Merged
merged 2 commits into from
Oct 29, 2024
Merged

first pass at security.md [SLT-250] #3205

merged 2 commits into from
Oct 29, 2024

Conversation

Defi-Moses
Copy link
Collaborator

@Defi-Moses Defi-Moses commented Sep 27, 2024

First pass at public security policy

Summary by CodeRabbit

  • New Features
    • Introduced a structured security policy with a new SECURITY.md file for the Synapse Protocol.
    • Outlined the process for reporting vulnerabilities and emphasized responsible disclosure.
    • Provided clear guidelines on reporting methods and terms regarding rewards for reported vulnerabilities.

Copy link
Contributor

coderabbitai bot commented Sep 27, 2024

Walkthrough

The changes introduce a new SECURITY.md file that establishes a comprehensive security policy for the Synapse Protocol. This document outlines the process for reporting vulnerabilities, emphasizes responsible disclosure, and specifies inappropriate disclosure methods. It also addresses vulnerabilities in non-critical infrastructure and details the terms regarding rewards for reported issues, stating that Synapse Labs retains the right to modify or cancel the program at any time.

Changes

File Change Summary
SECURITY.md Introduced a structured security policy for reporting vulnerabilities, including guidelines for responsible disclosure, contact methods, and terms for vulnerability rewards.

Poem

In the land of code where bunnies hop,
A new guide emerges, no need to stop.
Report with care, let secrets unfold,
For safety and trust, our hearts are bold.
With every bug shared, we build a strong nest,
Together we thrive, in security, we're blessed! 🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Defi-Moses Defi-Moses changed the title first pass at security.md first pass at security.md [SLT-250] Sep 27, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Outside diff range and nitpick comments (2)
SECURITY.md (2)

26-26: Ensure consistent naming throughout the document.

The term "Labs" is used inconsistently in this section. It's referred to as "Synapse Labs" at the beginning of the sentence and just "Labs" at the end. For clarity and consistency, it's best to use the full name "Synapse Labs" throughout the document.

Consider updating the sentence as follows:

-For vulnerabilities in any of our websites, email servers, or other non-critical infrastructure, please email Synapse Labs at {_____}. We and Labs appreciate detailed instructions outlining the vulnerability.
+For vulnerabilities in any of our websites, email servers, or other non-critical infrastructure, please email Synapse Labs at {_____}. We at Synapse Labs appreciate detailed instructions outlining the vulnerability.

30-30: Consider revising the phrase "any and all rights".

The phrase "any and all rights" might be considered wordy. While it's a common legal phrase, it could be simplified for clarity.

Consider revising the sentence as follows:

-By submitting your report, you grant Synapse Labs any and all rights, including without limitation intellectual property rights, needed to validate, mitigate, and disclose the vulnerability.
+By submitting your report, you grant Synapse Labs all rights, including intellectual property rights, needed to validate, mitigate, and disclose the vulnerability.
🧰 Tools
🪛 LanguageTool

[style] ~30-~30: ‘any and all’ might be wordy. Consider a shorter alternative.
Context: ...ing your report, you grant Synapse Labs any and all rights, including without limitation in...

(EN_WORDINESS_PREMIUM_ANY_AND_ALL)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 5fd9bac and aebdf91.

📒 Files selected for processing (1)
  • SECURITY.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
SECURITY.md

[style] ~30-~30: ‘any and all’ might be wordy. Consider a shorter alternative.
Context: ...ing your report, you grant Synapse Labs any and all rights, including without limitation in...

(EN_WORDINESS_PREMIUM_ANY_AND_ALL)

🔇 Additional comments (1)
SECURITY.md (1)

16-23: Well-defined guidelines for responsible disclosure.

This section effectively outlines inappropriate disclosure methods, which is crucial for maintaining the security of the protocol. The points are clear and concise, helping to prevent accidental public disclosures.


## Other Terms

The decisions made regarding rewards are final and binding. By submitting your report, you grant Synapse Labs any and all rights, including without limitation intellectual property rights, needed to validate, mitigate, and disclose the vulnerability. All reward decisions, including eligibility for and amounts of the rewards and how such rewards will be paid, are made at the sole discretion of Synapse Labs. Terms and conditions of the Program may be altered at any time. Synapse Labs may change or cancel this Program at any time, for any reason.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider restructuring the Other Terms section for clarity.

While the terms covered in this section are comprehensive, the dense paragraph structure might make it difficult for readers to quickly grasp all the important points. Consider breaking this into bullet points or shorter paragraphs for improved readability.

Here's a suggested restructure:

## Other Terms

- All reward decisions, including eligibility, amounts, and payment methods, are made at the sole discretion of Synapse Labs. These decisions are final and binding.
- By submitting your report, you grant Synapse Labs all rights, including intellectual property rights, needed to validate, mitigate, and disclose the vulnerability.
- Synapse Labs reserves the right to alter the terms and conditions of the Program at any time.
- Synapse Labs may change or cancel this Program at any time, for any reason.
🧰 Tools
🪛 LanguageTool

[style] ~30-~30: ‘any and all’ might be wordy. Consider a shorter alternative.
Context: ...ing your report, you grant Synapse Labs any and all rights, including without limitation in...

(EN_WORDINESS_PREMIUM_ANY_AND_ALL)

SECURITY.md Outdated
All bug disclosures should be disclosed privately to a member of Synapse Labs. This can be done in the following ways:

1. Open up a ticket in the Synapse Discord
2. Email {_______}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add the missing email address for vulnerability reporting.

The email address for reporting vulnerabilities is missing. This is a critical piece of information that needs to be added before this document is published.

Please replace the placeholder with the correct email address:

-2. Email {_______}
+2. Email [email protected]

Committable suggestion was skipped due to low confidence.

Comment on lines +1 to +8
# Security Policy

## Overview

The security of Synapse Protocol is paramount. To standardize and encourage the discovery of bugs, the following outlines how to report bugs found in Synapse Protocol, sanguine, or any related code base. The program enables community members to submit reports of "bugs" or vulnerabilities for a chance to earn rewards. The program aims to incentivise responsible disclosure and enhance the security of Synapse Protocol.

Bounties are allocated on an ad hoc basis, and depend on the legitimacy, risk level, and other variables.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider providing more details about the bounty program.

The overview effectively introduces the security policy. However, the statement about bounty allocation (line 7) is quite vague. To encourage participation, consider providing more specific information about the bounty program, such as potential reward ranges or factors that influence the reward amount.

You could add a sentence like:

+Rewards typically range from $X to $Y, depending on the severity and impact of the reported vulnerability.

Committable suggestion was skipped due to low confidence.

SECURITY.md Outdated

## Other Vulnerabilities

For vulnerabilities in any of our websites, email servers, or other non-critical infrastructure, please email Synapse Labs at {_____}. We and Labs appreciate detailed instructions outlining the vulnerability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Add the missing email address for non-critical vulnerabilities.

The email address for reporting non-critical vulnerabilities is missing. This information needs to be added before the document is published.

Please replace the placeholder with the correct email address:

-For vulnerabilities in any of our websites, email servers, or other non-critical infrastructure, please email Synapse Labs at {_____}. We and Labs appreciate detailed instructions outlining the vulnerability.
+For vulnerabilities in any of our websites, email servers, or other non-critical infrastructure, please email Synapse Labs at [email protected]. We at Synapse Labs appreciate detailed instructions outlining the vulnerability.

Committable suggestion was skipped due to low confidence.

SECURITY.md Outdated
Comment on lines 11 to 15
All bug disclosures should be disclosed privately to a member of Synapse Labs. This can be done in the following ways:

1. Open up a ticket in the Synapse Discord
2. Email {_______}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider adding information about the response process.

While the reporting methods are clear, it would be helpful to include information about what reporters can expect after submitting a vulnerability. This could include expected response times and an overview of the process that follows a report.

Consider adding a paragraph like:

+After submitting a report, you can expect an initial response within 24-48 hours. Our security team will then assess the report and may contact you for additional information if needed. We aim to resolve and disclose verified vulnerabilities within 90 days of the initial report.

Committable suggestion was skipped due to low confidence.

Copy link

cloudflare-workers-and-pages bot commented Sep 27, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2db424a
Status: ✅  Deploy successful!
Preview URL: https://4333bd6d.sanguine-fe.pages.dev
Branch Preview URL: https://docs-security.sanguine-fe.pages.dev

View logs

Copy link

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Oct 12, 2024
@github-actions github-actions bot closed this Oct 17, 2024
@aureliusbtc aureliusbtc reopened this Oct 28, 2024
@github-actions github-actions bot removed the Stale label Oct 29, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (1)
SECURITY.md (1)

30-30: Simplify the legal language

The terms section contains unnecessarily complex language that could be simplified while maintaining its legal validity.

-By submitting your report, you grant Synapse Labs any and all rights, including without limitation intellectual property rights,
+By submitting your report, you grant Synapse Labs all rights, including intellectual property rights,
🧰 Tools
🪛 LanguageTool

[style] ~30-~30: ‘any and all’ might be wordy. Consider a shorter alternative.
Context: ...ing your report, you grant Synapse Labs any and all rights, including without limitation in...

(EN_WORDINESS_PREMIUM_ANY_AND_ALL)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between aebdf91 and 2db424a.

📒 Files selected for processing (1)
  • SECURITY.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
SECURITY.md

[style] ~30-~30: ‘any and all’ might be wordy. Consider a shorter alternative.
Context: ...ing your report, you grant Synapse Labs any and all rights, including without limitation in...

(EN_WORDINESS_PREMIUM_ANY_AND_ALL)

Comment on lines +18 to +23
Please exercise prudence when disclosing a bug. The following actions are the wrong way to disclose a bug:

- Filing a public ticket mentioning the vulnerability
- Testing the vulnerability on mainnet or testnet
- Sharing the bug on a public channel

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add responsible disclosure timeline and expectations

While the prohibited actions are clear, the section would benefit from including:

  1. Expected timeline for vulnerability assessment and fixes
  2. Coordinated disclosure process
  3. Guidelines for when public disclosure is appropriate

Add this section after line 23:

## Disclosure Timeline

- Initial Response: Within 24-48 hours
- Assessment: 3-5 business days
- Fix Development: Based on severity
  - Critical: Up to 30 days
  - High: Up to 60 days
  - Medium/Low: Up to 90 days
- Coordinated Public Disclosure: After fix deployment and testing

Comment on lines +11 to +15
All bug disclosures should be disclosed privately to a member of Synapse Labs. This can be done in the following ways:

1. Open up a ticket in the Synapse Discord
2. Reach out to a core team member privately on Telegram

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Enhance the security reporting channels

The current reporting channels (Discord and Telegram) may not provide adequate security for sensitive vulnerability reports. Consider:

  1. Adding PGP-encrypted email as a reporting option
  2. Providing specific contact handles/information for core team members
  3. Including a security.txt file reference

Add these secure communication channels:

 All bug disclosures should be disclosed privately to a member of Synapse Labs. This can be done in the following ways:

 1. Open up a ticket in the Synapse Discord
 2. Reach out to a core team member privately on Telegram
+3. Send an encrypted email to [email protected] (PGP Key: <key-fingerprint>)
+
+For secure communications, our PGP public key can be found at: <key-url>

Committable suggestion was skipped due to low confidence.

Comment on lines +24 to +26
## Other Vulnerabilities

For vulnerabilities in any of our websites, email servers, or other non-critical infrastructure, please reach out through one of the channels above. We and Labs appreciate detailed instructions outlining the vulnerability.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Revise the non-critical vulnerabilities section

The section needs improvement in both content and grammar:

  1. Separate channels should be provided for non-critical issues
  2. Fix the grammatical error in "We and Labs"

Apply this correction:

-For vulnerabilities in any of our websites, email servers, or other non-critical infrastructure, please reach out through one of the channels above. We and Labs appreciate detailed instructions outlining the vulnerability.
+For vulnerabilities in any of our websites, email servers, or other non-critical infrastructure, please email [email protected]. Synapse Labs appreciates detailed instructions outlining the vulnerability. Please include:
+
+- Description of the vulnerability
+- Steps to reproduce
+- Potential impact
+- Suggested remediation (if any)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Other Vulnerabilities
For vulnerabilities in any of our websites, email servers, or other non-critical infrastructure, please reach out through one of the channels above. We and Labs appreciate detailed instructions outlining the vulnerability.
## Other Vulnerabilities
For vulnerabilities in any of our websites, email servers, or other non-critical infrastructure, please email [email protected]. Synapse Labs appreciates detailed instructions outlining the vulnerability. Please include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested remediation (if any)

@Defi-Moses Defi-Moses merged commit 2adc86b into master Oct 29, 2024
27 checks passed
@Defi-Moses Defi-Moses deleted the docs/security branch October 29, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants