-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from atsign-foundation/cpswan-openssf-scorecard
feat: Add openssf scorecard
- Loading branch information
Showing
2 changed files
with
97 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# This workflow uses actions that are not certified by GitHub. They are provided | ||
# by a third-party and are governed by separate terms of service, privacy | ||
# policy, and support documentation. | ||
|
||
name: Scorecards supply-chain security | ||
on: | ||
# For Branch-Protection check. Only the default branch is supported. See | ||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection | ||
branch_protection_rule: | ||
# To guarantee Maintained check is occasionally updated. See | ||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained | ||
schedule: | ||
- cron: '22 4 * * 6' | ||
push: | ||
branches: [ "trunk" ] | ||
|
||
# Declare default permissions as read only. | ||
permissions: read-all | ||
|
||
jobs: | ||
analysis: | ||
name: Scorecards analysis | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Needed to upload the results to code-scanning dashboard. | ||
security-events: write | ||
# Needed to publish results and get a badge (see publish_results below). | ||
id-token: write | ||
# Uncomment the permissions below if installing in a private repository. | ||
# contents: read | ||
# actions: read | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Run analysis" | ||
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 | ||
with: | ||
results_file: results.sarif | ||
results_format: sarif | ||
# (Optional) Read-only PAT token. Uncomment the `repo_token` line below if: | ||
# - you want to enable the Branch-Protection check on a *public* repository, or | ||
# - you are installing Scorecards on a *private* repository | ||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. | ||
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }} | ||
|
||
# Public repositories: | ||
# - Publish results to OpenSSF REST API for easy access by consumers | ||
# - Allows the repository to include the Scorecard badge. | ||
# - See https://github.com/ossf/scorecard-action#publishing-results. | ||
# For private repositories: | ||
# - `publish_results` will always be set to `false`, regardless | ||
# of the value entered here. | ||
publish_results: true | ||
|
||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF | ||
# format to the repository Actions tab. | ||
- name: "Upload artifact" | ||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | ||
with: | ||
name: SARIF file | ||
path: results.sarif | ||
retention-days: 5 | ||
|
||
# Upload the results to GitHub's code scanning dashboard. | ||
- name: "Upload to code-scanning" | ||
uses: github/codeql-action/upload-sarif@b374143c1149a9115d881581d29b8390bbcbb59c # v3.22.11 | ||
with: | ||
sarif_file: results.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,45 @@ | ||
<img width=250px src="https://atsign.dev/assets/img/atPlatform_logo_gray.svg?sanitize=true"> | ||
<a href="https://atsign.com#gh-light-mode-only"><img width=250px src="https://atsign.com/wp-content/uploads/2022/05/atsign-logo-horizontal-color2022.svg#gh-light-mode-only" alt="The Atsign Foundation"></a><a href="https://atsign.com#gh-dark-mode-only"><img width=250px src="https://atsign.com/wp-content/uploads/2023/08/atsign-logo-horizontal-reverse2022-Color.svg#gh-dark-mode-only" alt="The Atsign Foundation"></a> | ||
|
||
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/atsign-foundation/at_pico_w/badge)](https://api.securityscorecards.dev/projects/github.com/atsign-foundation/at_pico_w) | ||
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8277/badge)](https://www.bestpractices.dev/projects/8277) | ||
|
||
# at_pico_w | ||
|
||
Communicate with the atPlatform using a Raspberry Pi Pico W. | ||
|
||
Developed with [MicroPython](https://micropython.org/). | ||
|
||
## Usage | ||
|
||
### Raspberry Pi Pico W | ||
- Install the latest `firmware.uf2` onto your Pico W from [atsign-foundation/micropython Releases](https://github.com/atsign-foundation/micropython/releases), as this is patched to enable AES CTR, which is used by atSigns. | ||
- Fill all the fields of the `settings.json` file (ssid/passw of your Wi-Fi network and atSign). | ||
|
||
- Install the latest `firmware.uf2` onto your Pico W from | ||
[atsign-foundation/micropython Releases](https://github.com/atsign-foundation/micropython/releases) | ||
, as this is patched to enable AES CTR, which is used by atSigns. | ||
- Fill all the fields of the `settings.json` file (ssid/passw of your Wi-Fi | ||
network and atSign). | ||
- Run `python3 build.py` to generate .mpy files | ||
- Download [Thonny IDE](https://thonny.org/) and place all the files of the built directory onto the Pico W file system. | ||
- Place your `.atKeys` file in the `~/.atsign/keys/` directory (if the folder doesn't exist, create it manually) | ||
- Run `main.py` and select option `3` in the REPL ("Get privateKey for @[yourAtSign]") | ||
- Download [Thonny IDE](https://thonny.org/) and place all the files of the | ||
built directory onto the Pico W file system. | ||
- Place your `.atKeys` file in the `~/.atsign/keys/` directory (if the folder | ||
doesn't exist, create it manually) | ||
- Run `main.py` and select option `3` in the REPL ("Get privateKey for | ||
@[yourAtSign]") | ||
- Re-launch the REPL (run `main.py` again) | ||
- Now you can select option `2` in the REPL to automatically get authenticated in your DESS | ||
- Now you can select option `2` in the REPL to automatically get | ||
authenticated in your DESS | ||
- Enjoy! :) | ||
|
||
(If you get an error when attempting to find the atServer or when trying to connect to it, run the REPL again) | ||
(If you get an error when attempting to find the atServer or when trying to | ||
connect to it, run the REPL again) | ||
|
||
### Micropython on Linux | ||
- Compile micropython with coverage enabled (to get AES CTR) and place the binary somewhere on the PATH (e.g. ~/.local/bin/) | ||
|
||
- Compile micropython with coverage enabled (to get AES CTR) and place the | ||
binary somewhere on the PATH (e.g. ~/.local/bin/) | ||
- `micropython main.py` | ||
|
||
## Libraries | ||
|
||
- [iot-core-micropython](https://github.com/GoogleCloudPlatform/iot-core-micropython) | ||
- [uasn1](https://github.com/mkomon/uasn1) |