diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..fc688d6 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @5afe/infrasec diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..667b089 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint + +on: + pull_request: + branches: + - main + push: + branches: + - main + +permissions: {} + +jobs: + markdown: + name: Markdown + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: DavidAnson/markdownlint-cli2-action@696eb3f2509270d7b882d2aa68347bc676e7af34 # v25.0.0 diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 0000000..318de7e --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -0,0 +1,8 @@ +config: + # Prose is written one paragraph per line. + MD013: false + # The README opens with a centered logo. + MD033: false + MD041: false +globs: + - "**/*.md" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2528669 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,83 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at `conduct@safe.global`. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..cf86937 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,54 @@ +# Contributing + +Thank you for your interest in contributing. This organization is Safe Dev Space, where new ideas around Safe are tested. Many repositories here are experiments that are not actively maintained, so ask in an issue, where issues are enabled, whether a contribution is wanted before you start. This guide applies to every repository in this organization that does not have its own `CONTRIBUTING.md`. It is written for contributors outside Safe Labs. A repository with its own guide follows that guide instead, and setup instructions in a repository's `README.md` always apply. + +Some repositories are forks of other projects. Send changes that are not specific to Safe to the upstream project. + +## Before You Start + +- **Questions and support** do not belong in issues. See the [support guide](SUPPORT.md). +- **Security vulnerabilities** must not be reported in public. See the [security policy](SECURITY.md). +- **Check what exists.** Search the open issues and pull requests first. Your idea may already be in progress or have been discussed. +- **Talk before large changes.** For a new feature, a refactor, or a change to critical behavior, open an issue first so we can agree on the direction before you invest time. + +## What We Accept + +We welcome bug fixes, tests, documentation improvements, and features that fit the direction of the project. + +We do not accept: + +- Pull requests that only fix a typo, change wording, or reformat code. They are typically automated activity. If you find a typo, open an issue. This includes pull requests that fix one. +- Large refactors or redesigns that were not discussed first. +- Changes to dependencies, lockfiles, CI workflows, or build and release scripts that were not agreed in an issue first. +- Changes without tests where tests are possible, or without a meaningful description. +- Contributions that you do not understand or cannot explain. You may use AI tools, but you are responsible for every line you submit, and you must be able to answer review questions yourself. + +A merged pull request does not entitle you to any reward, token, or other benefit. + +## Licensing and CLA + +Each repository states its license in its `LICENSE` file, and in a `NOTICE` file where one exists. Licenses differ between repositories, and some repositories changed license over time, so read the files of the repository you contribute to. + +By submitting a pull request, you agree that your contribution is licensed under the license in that repository's `LICENSE` file as it stands when your pull request is merged. If the repository has no license file, ask in an issue before you contribute. Only submit work that you have the right to submit, including code written with AI tools or copied from elsewhere. + +Where a repository requires a Contributor License Agreement (CLA), a check on your pull request asks you to sign it. You sign by posting a comment on the pull request. Your GitHub username and signature are stored in a public repository. Read the agreement before you sign. If its link does not load, do not sign, and tell us in the pull request. Your pull request cannot be merged until you have signed. + +## Making a Change + +1. Fork the repository and create a branch from its default branch, unless the repository's own guide names a different base branch. +2. Follow the setup instructions in the repository's `README.md`. +3. Keep the change focused. One pull request addresses one bug, feature, or improvement. +4. Follow the existing code style, and run the linters and tests locally. +5. Add or update tests for the behavior you change, and update the documentation where behavior changes. + +## Opening a Pull Request + +- Use a [Conventional Commits](https://www.conventionalcommits.org) title, such as `fix: handle empty owner list`, where the repository follows that convention. Pull requests are squash merged, so the title becomes the commit message. +- Fill in the pull request template if the repository has one. Otherwise describe what changed and why, and link the related issue, for example `Fixes #123`. +- Mark the pull request as a draft while it is still in progress. +- Automated checks on a pull request from a fork may wait until a maintainer approves the run. +- A maintainer may review the pull request. Please respond to review comments, and keep the branch up to date with the base branch. + +## Code of Conduct + +Everyone taking part in this project is expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md). diff --git a/README.md b/README.md index 2b03cb6..d0aa86a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,37 @@ -# .github -Organization-wide community health files, including the default security policy +

+ + + + Safe + + +

+ +# Safe Dev Space + +This organization is where new ideas around Safe are tested: experiments, prototypes, and research code. + +> [!NOTE] +> Unless a repository says otherwise, the code here is unaudited, provided as is, and not meant for production use or for securing real funds. + +[Website](https://safe.global) ยท [Documentation](https://docs.safe.global) + +## About This Repository + +This repository holds the files that apply to every repository in the organization unless a repository has its own copy. + +| File | Purpose | +| --- | --- | +| [`SECURITY.md`](SECURITY.md) | Default security policy: how to report a vulnerability and what to expect. | +| [`CONTRIBUTING.md`](CONTRIBUTING.md) | Default contribution guide: what we accept, licensing, and how to open a pull request. | +| [`SUPPORT.md`](SUPPORT.md) | Where to take questions, bug reports, and feature requests. | +| [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) | The Contributor Covenant, version 2.1. | + +## Reporting a Security Issue + +Please do not open a public issue. Follow the [security policy](SECURITY.md), or write to `security@safe.global`. + +## Related Organizations + +- [safe-global](https://github.com/safe-global): production code maintained by Safe Labs. +- [safe-fndn](https://github.com/safe-fndn): the Safe Smart Account contracts and modules, maintained by the Safe Ecosystem Foundation. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..230f02c --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,110 @@ +# Security Policy + +This is the default security policy of Safe Labs GmbH for the repositories in this organization. A repository that has its own `SECURITY.md` follows that file instead. + +> [!NOTE] +> This organization holds experiments, prototypes, and research code. Unless a repository says otherwise, its code is unaudited, provided as is, and not meant for production use or for securing real funds. + +## Where to Report + +| What you found | Where it goes | +| --- | --- | +| A vulnerability in code in this organization, or in a service operated by Safe Labs (Safe{Wallet} web and mobile, backend services and APIs, SDKs, deployment registries, infrastructure code) | This policy. See [Reporting a Vulnerability](#reporting-a-vulnerability). | +| A vulnerability in the Safe Smart Account contracts or modules | The Safe Ecosystem Foundation, which maintains them in a separate organization and runs its own bug bounty program. See . | +| A vulnerability in a third-party Safe App, a fork, or a project that integrates Safe | The maintainers of that project. | +| A phishing site or an account impersonating Safe | `security@safe.global`, with the address of the site or account. | +| A bug with no security impact | A public issue on the affected repository. | + +## Reporting a Vulnerability + +Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests. + +Use GitHub's private vulnerability reporting on the affected repository: + +1. Open the repository's **Security** tab. +2. Select **Advisories**. +3. Select **Report a vulnerability**. + +If private vulnerability reporting is not available for the repository, or the issue affects a running service and not a specific repository, write to `security@safe.global`. + +If user funds are at risk or a vulnerability is being exploited right now, write to `security@safe.global` and start the subject line with `URGENT`. + +Please include as much of the following as you can: + +- The affected repository, file, and version or commit, or the affected service and address. +- A description of the vulnerability and its potential impact. +- Steps to reproduce, or a proof of concept. +- Any required permissions, tools, or configuration. +- Suggested mitigations, if known. +- Whether the vulnerability is already public or being actively exploited. + +Never include real private keys, seed phrases, access tokens, personal information, or other production secrets in a report. + +## Scope + +In scope: + +- Code in the active, non-archived repositories of this organization. +- Packages and container images that Safe Labs publishes from these repositories. +- Production services operated by Safe Labs under `safe.global`. + +We are most interested in issues that could lead to: + +- Loss or freezing of user funds, or a transaction being executed that differs from what the user approved. +- Wrong or incomplete information shown to a user at the moment of signing. +- Tampering with transactions, signatures, or Safe configuration in our services or SDKs. +- Wrong contract addresses or ABIs in the deployment registries. +- Compromise of our build, release, or package publishing process. +- Unauthorized access to user data or to our infrastructure. + +Out of scope: + +- Smart contracts, third-party Safe Apps, forks, and integrations. See [Where to Report](#where-to-report). +- Archived repositories and releases that are no longer supported. +- Findings from automated scanners without a demonstrated security impact. +- Missing security headers, missing rate limits, or other best practice gaps without a demonstrated security impact. +- Vulnerabilities in third-party dependencies that are already public, unless you can show they are exploitable in our code. +- Attacks that require a compromised device, physical access, or a user ignoring a clear warning. +- Social engineering, phishing, or physical attacks against Safe Labs staff, contractors, or users. +- Denial of service through volume. + +## Rules for Testing + +- Test only against Safes, accounts, and data that you own, and prefer test networks. +- Do not access, change, or delete data that belongs to other people. If you come across personal data or secrets, stop, do not keep or share them, and tell us. +- Do not degrade or interrupt our services, and do not run high-volume automated scans against production. +- Use a finding only as far as needed to show that it exists. +- Do not disclose the issue to anyone else before it is resolved, except as described under [Disclosure](#disclosure). +- Follow the laws that apply to you. + +## Safe Harbor + +Safe Labs considers security research that follows this policy and is carried out in good faith to be authorized. We will not take legal action against you or file a criminal complaint for such research, and we will not treat it as a breach of our terms of use. + +This statement covers only Safe Labs and the systems we operate. We cannot authorize testing of systems that belong to others, such as cloud providers, blockchain networks, or third-party applications, and we cannot speak for other parties or for public authorities. If someone else takes action against you for research that followed this policy, we will say that you acted in line with it. + +If you are not sure whether something is allowed, ask us at `security@safe.global` before you go further. + +## What to Expect + +- We aim to acknowledge your report within 3 working days. +- We will keep you informed while we investigate and tell you when the issue is resolved. +- If the report belongs to another party, such as the Safe Ecosystem Foundation, we will tell you and, with your agreement, pass it on. + +## Disclosure + +We follow coordinated disclosure. Please give us up to 90 days from your report to fix the issue before you make it public. We may ask for more time when a fix needs coordination with other parties, and we will explain why. + +Once a fix is released we publish a GitHub security advisory on the affected repository where that helps users. We credit reporters in the advisory unless they prefer to stay anonymous. + +## Rewards + +Safe Labs does not run a bug bounty program for the repositories and services covered by this policy. We may offer a reward for a report, entirely at our discretion. Submitting a report does not create a right to a reward, and nothing in this policy is a promise of one. Any reward is subject to applicable law, including sanctions rules. + +## Supported Versions + +Security fixes are provided for the latest release and the default branch of each repository. Older releases are not supported unless the repository says otherwise. For published packages, fixes are shipped as a new release and announced in a GitHub security advisory. + +## Your Data + +We use the personal data in your report only to handle the report and to contact you about it. See . diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 0000000..4885493 --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,39 @@ +# Support + +This organization is Safe Dev Space, where new ideas around Safe are tested. Most repositories here are experiments or prototypes and come without support. Unless a repository says otherwise, its code is not meant for production use or for securing real funds. This page tells you where to take a question. + +> [!WARNING] +> No one from Safe Labs will ever ask for your seed phrase, recovery phrase, or private key, or ask you to sign a transaction, connect your wallet, or install software to "verify", "restore", or "unlock" an account. We never start a support conversation by direct message. Treat unsolicited offers of help as scams. +> +> Safe{Wallet} is self-custodial. Safe Labs cannot reverse a transaction, restore access, or return funds. Treat anyone who offers to do so as a scam. + +## Where to Go + +| What you need | Where to go | +| --- | --- | +| Help using Safe{Wallet} on web or mobile | [Help Center](https://help.safe.global) | +| Documentation for the SDKs, APIs, and smart account | [docs.safe.global](https://docs.safe.global) | +| A question about building with Safe | [Ethereum Stack Exchange](https://ethereum.stackexchange.com/questions/tagged/safe-core) with the `safe-core` tag | +| A bug in code from this organization | An issue on the affected repository, if issues are enabled there | +| A feature request | An issue on the affected repository, if issues are enabled there | +| A security vulnerability | The [security policy](SECURITY.md). Do not open a public issue. | +| A phishing site or an account impersonating Safe | `security@safe.global`, with the address of the site or account | + +## Before You Open an Issue + +- Search the existing issues, the documentation, and Stack Exchange. Your question may already be answered. +- Use GitHub issues for bug reports and feature requests. Questions and general support requests may be closed and redirected. +- Open the issue on the repository the problem belongs to. If you are not sure which one, pick the closest and say so. + +## What to Include + +- What you did, what you expected, and what happened instead. +- The version or commit, the network, and the browser, device, or runtime. +- Steps to reproduce, with error messages and logs. +- Safe addresses and transaction hashes, if they help. Posting them links your GitHub account to that Safe in public, so use a test Safe where you can. + +Never post private keys, seed phrases, API keys, or personal data in an issue. + +## Response Times + +Repositories here are experiments. Issues may go unanswered, and a repository may be archived without notice. diff --git a/assets/safe-logo-black.svg b/assets/safe-logo-black.svg new file mode 100644 index 0000000..c06c469 --- /dev/null +++ b/assets/safe-logo-black.svg @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/assets/safe-logo-white.svg b/assets/safe-logo-white.svg new file mode 100644 index 0000000..f60bac5 --- /dev/null +++ b/assets/safe-logo-white.svg @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file