From 9c2c63ba1b1bf7d4511db534c990f4c01ec6cbd0 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Tue, 24 Sep 2024 09:35:41 +0100 Subject: [PATCH 1/3] Add DocC catalog and README Motivation: We should have a README to explain what the package is and should point to docs we publish to the Swift Package Index. Modifications: - Add a README - Add a .spi.yml - Add a DocC catalog Result: More docs --- .spi.yml | 5 ++ CONTRIBUTING.md | 21 ++------- README.md | 15 ++++++ SECURITY.md | 46 +------------------ .../Documentation.docc/Documentation.md | 20 ++++++++ 5 files changed, 45 insertions(+), 62 deletions(-) create mode 100644 .spi.yml create mode 100644 README.md create mode 100644 Sources/GRPCProtobuf/Documentation.docc/Documentation.md diff --git a/.spi.yml b/.spi.yml new file mode 100644 index 0000000..80d7779 --- /dev/null +++ b/.spi.yml @@ -0,0 +1,5 @@ +version: 1 +builder: + configs: + - documentation_targets: [GRPCProtobuf] + swift_version: 6.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe46758..ec4fbf7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,19 +1,4 @@ -# How to contribute +# Contributing -We definitely welcome patches and contributions to grpc-swift! Please read the gRPC -organization's [governance rules](https://github.com/grpc/grpc-community/blob/main/governance.md) -and [contribution guidelines](https://github.com/grpc/grpc-community/blob/main/CONTRIBUTING.md) before proceeding. - -Here are some guidelines and information about how to participate. - -## Getting started - -### Legal requirements - -In order to protect both you and ourselves, you will need to sign the -[Contributor License Agreement](https://identity.linuxfoundation.org/projects/cncf). - -### Technical requirements - -Please see the [main gRPC repository](https://github.com/grpc/grpc) for -more information about gRPC. +Please refer to the contributing guide in the +[`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository. diff --git a/README.md b/README.md new file mode 100644 index 0000000..f21cdf4 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# gRPC Swift Protobuf + +This repository contains integrations with [SwiftProtobuf][gh-swift-protobuf] +for [gRPC Swift][gh-grpc-swift-protobuf]. + +- 📚 **Documentation** is available on the [Swift Package Index][spi-grpc-swift-protobuf] +- 💻 **Examples** are available in the `Examples` directory of the + [`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository +- 🚀 **Contributions** are welcome, pleasee see [CONTRIBUTING.md](CONTRIBUTING.md) +- 🪪 **License** is Apache 2.0, repeated in [LICENSE](License) +- 🔒 **Security** issues should be reported via the process in [SECURITY.md](SECURITY.md) + +[gh-swift-protobuf]: https://github.com/apple/swift-protobuf +[gh-grpc-swift-protobuf]: https://github.com/grpc/grpc-swift-protobuf +[spi-grpc-swift-protobuf]: https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation diff --git a/SECURITY.md b/SECURITY.md index 4546778..74173da 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,46 +1,4 @@ # Security -This document specifies the security process for gRPC Swift. - -## Disclosures - -### Private Disclosure Process - -The gRPC Swift team asks that known and suspected vulnerabilities be -privately and responsibly disclosed by emailing -[grpc-swift-security@group.apple.com](mailto:grpc-swift-security@group.apple.com) -with the [details usually included with bug reports][issue-template]. -**Do not file a public issue.** - -#### When to report a vulnerability - -* You think you have discovered a potential security vulnerability in gRPC - Swift. -* You are unsure how a vulnerability affects gRPC Swift. - -#### What happens next? - -* A member of the team will acknowledge receipt of the report within 3 - working days (United Kingdom). This may include a request for additional - information about reproducing the vulnerability. -* We will privately inform the Swift Server Work Group ([SSWG][sswg]) of the - vulnerability within 10 days of the report as per their [security - guidelines][sswg-security]. -* Once we have identified a fix we may ask you to validate it. We aim to do this - within 30 days. In some cases this may not be possible, for example when the - vulnerability exists at the protocol level and the industry must coordinate on - the disclosure process. -* If a CVE number is required, one will be requested from [MITRE][mitre] - providing you with full credit for the discovery. -* We will decide on a planned release date and let you know when it is. -* Prior to release, we will inform major dependents that a security-related - patch is impending. -* Once the fix has been released we will publish a security advisory on GitHub - and the [SSWG][sswg] will announce the vulnerability on the [Swift - forums][swift-forums-sec]. - -[issue-template]: https://github.com/grpc/grpc-swift/blob/main/.github/ISSUE_TEMPLATE/BUG_REPORT.md -[sswg]: https://github.com/swift-server/sswg -[sswg-security]: https://github.com/swift-server/sswg/blob/main/process/incubation.md#security-best-practices -[swift-forums-sec]: https://forums.swift.org/c/server/security-updates/ -[mitre]: https://cveform.mitre.org/ +Please refer to [SECURITY.md] in the +[`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository. diff --git a/Sources/GRPCProtobuf/Documentation.docc/Documentation.md b/Sources/GRPCProtobuf/Documentation.docc/Documentation.md new file mode 100644 index 0000000..1d1f0d5 --- /dev/null +++ b/Sources/GRPCProtobuf/Documentation.docc/Documentation.md @@ -0,0 +1,20 @@ +# ``GRPCProtobuf`` + +A package integrating Swift Protobuf with gRPC Swift. + +## Overview + +This package provides two products: +- ``GRPCProtobuf``, a module providing runtime serialization and deserialization components for + [SwiftProtobuf](https://github.com/apple/swift-protobuf). +- `protoc-gen-grpc-swift`, an executable which is a plugin for `protoc`, the Protocol Buffers + compiler. An article describing how to generate gRPC Swift stubs using it is available with the + `grpc-swift` documentation on the [Swift Package + Index](https://swiftpackageindex.com/grpc/grpc-swift/documentation). + +## Topics + +### Serialization + +- ``ProtobufSerializer`` +- ``ProtobufDeserializer`` From bdd9d7518b7cb94ab5d88eb51ac9ec1e4eb90875 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Tue, 24 Sep 2024 20:03:09 +0100 Subject: [PATCH 2/3] reference tutorials --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f21cdf4..87f93bb 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ This repository contains integrations with [SwiftProtobuf][gh-swift-protobuf] for [gRPC Swift][gh-grpc-swift-protobuf]. - 📚 **Documentation** is available on the [Swift Package Index][spi-grpc-swift-protobuf] +- 🎓 **Tutorials** are available in the documentation for `grpc/grpc-swift` on + the [Swift Package Index][spi-grpc-swift]. - 💻 **Examples** are available in the `Examples` directory of the [`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository - 🚀 **Contributions** are welcome, pleasee see [CONTRIBUTING.md](CONTRIBUTING.md) @@ -12,4 +14,5 @@ for [gRPC Swift][gh-grpc-swift-protobuf]. [gh-swift-protobuf]: https://github.com/apple/swift-protobuf [gh-grpc-swift-protobuf]: https://github.com/grpc/grpc-swift-protobuf +[spi-grpc-swift]: https://swiftpackageindex.com/grpc/grpc-swift/documentation [spi-grpc-swift-protobuf]: https://swiftpackageindex.com/grpc/grpc-swift-protobuf/documentation From 159f6e122823c40029a8b6d2a64c7d6fdaee2f21 Mon Sep 17 00:00:00 2001 From: George Barnett Date: Mon, 30 Sep 2024 11:14:13 +0100 Subject: [PATCH 3/3] Update README.md Co-authored-by: Gus Cairo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87f93bb..f306bb2 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ for [gRPC Swift][gh-grpc-swift-protobuf]. the [Swift Package Index][spi-grpc-swift]. - 💻 **Examples** are available in the `Examples` directory of the [`grpc/grpc-swift`](https://github.com/grpc/grpc-swift) repository -- 🚀 **Contributions** are welcome, pleasee see [CONTRIBUTING.md](CONTRIBUTING.md) +- 🚀 **Contributions** are welcome, please see [CONTRIBUTING.md](CONTRIBUTING.md) - 🪪 **License** is Apache 2.0, repeated in [LICENSE](License) - 🔒 **Security** issues should be reported via the process in [SECURITY.md](SECURITY.md)