|
1 | | -This is a demo of the Github Actions for signing software with [SignPath.io](https://about.signpath.io). |
| 1 | +# Using SignPath with GitHub Actions |
2 | 2 |
|
3 | | -The sample workflow can be viewed at [.github/workflows/build-and-sign.yml](.github/workflows/build-and-sign.yml). |
| 3 | +This project demonstrates signing artifacts using [SignPath](https://about.signpath.io) from GitHub Actions workflows. |
4 | 4 |
|
5 | | -For a full documentation, view [github.com/SignPath/github-actions](https://github.com/SignPath/github-actions) |
| 5 | +Signing is invoked in the `sign` step of [.github/workflows/build-and-sign.yml](.github/workflows/build-and-sign.yml). |
| 6 | + |
| 7 | +See [github.com/SignPath/github-actions](https://github.com/SignPath/github-actions) for a full documentation of SignPath actions. |
| 8 | + |
| 9 | +## Policy demonstrations |
| 10 | + |
| 11 | +This project demonstrates the following attempts to violate SignPath policies and how they are averted on the control plane: |
| 12 | + |
| 13 | +* This step selects the appropriate [signing policy] depending on the branch name. The actual branch must match the branch condition of the selected signing policy. The [`attempt-signing-release`] branch demonstrates how SignPath will detect incorrect attempts. |
| 14 | +* The [`release/malicious-dll`] branch demonstrates how SignPath will detect content-level violations of the [artifact configuration]. |
| 15 | + |
| 16 | +## Configuration |
| 17 | + |
| 18 | +To use this demo with your own SignPath subscription, you need to get access to SignPath's GitHub Actions preview. Please contact support@signpath.io. |
| 19 | + |
| 20 | +* Fork this repository |
| 21 | + * Uncheck _Copy the main branch only_ |
| 22 | +* In your SignPath organization, create a project with |
| 23 | + * Slug: `Demo_Application` |
| 24 | + * Repository URLs: Your forked GitHub repository, e.g. `https://github.com/my/github-actions-demo` |
| 25 | + * Trusted Build Systems: Link _GitHub.com_ |
| 26 | + * Add the following artifact configuration as default: [.signpath/artifact-configurations/default.xml](.signpath/artifact-configurations/default.xml) |
| 27 | + * Add a `test-signing` signing policy |
| 28 | + * Add a `release-signing` signing policy with origin verification enabled and restricted to `main` and `release/*` branches |
| 29 | +* Create an [API token] in SignPath and add it as a GitHub Actions secret `SIGNPATH_API_TOKEN` (make sure the user is a submitter in your signing policies) |
| 30 | +* Add your SignPath _Organization ID_ as a GitHub Actions variable `SIGNPATH_ORGANIZATION_ID` (click your organization's name at the upper right corner) |
| 31 | +* Enable Actions for your GitHub repository |
| 32 | + |
| 33 | + |
| 34 | +[signing policy]: https://about.signpath.io/documentation/projects#signing-policies |
| 35 | +[artifact configuration]: https://about.signpath.io/documentation/projects#artifact-configurations |
| 36 | +[`attempt-signing-release`]: https://github.com/SignPath/github-actions-demo/blob/feature/attempt-signing-release/.github/workflows/build-and-sign.yml#L46 |
| 37 | +[`release/malicious-dll`]: https://github.com/SignPath/github-actions-demo/blob/release/malicious-dll/src/Build.ps1#L4 |
| 38 | + |
| 39 | +[API token]: https://about.signpath.io/documentation/users#interactive-api-token |
0 commit comments