diff options
| author | Felipe Balbi <[email protected]> | 2025-11-07 10:43:32 -0800 |
|---|---|---|
| committer | Felipe Balbi <[email protected]> | 2025-11-07 10:51:04 -0800 |
| commit | 812f3c840f4d505e285d1ddce6b0981dd745e344 (patch) | |
| tree | 4425cdc41b4dd59c5e8dbbfdef3b8e10cad28063 | |
| parent | e75066820ad320495ca70570641c90d75247b19b (diff) | |
Reintroduce necessary files
Signed-off-by: Felipe Balbi <[email protected]>
| -rw-r--r-- | .github/DOCS.md | 23 | ||||
| -rw-r--r-- | .github/codecov.yml | 21 | ||||
| -rw-r--r-- | .github/dependabot.yml | 19 | ||||
| -rw-r--r-- | .github/workflows/cargo-vet-pr-comment.yml | 137 | ||||
| -rw-r--r-- | .github/workflows/cargo-vet.yml | 53 | ||||
| -rw-r--r-- | .github/workflows/check.yml | 205 | ||||
| -rw-r--r-- | .github/workflows/nostd.yml | 43 | ||||
| -rw-r--r-- | .github/workflows/rolling.yml | 68 | ||||
| -rw-r--r-- | CODE_OF_CONDUCT.md | 132 | ||||
| -rw-r--r-- | CONTRIBUTING.md | 48 | ||||
| -rw-r--r-- | LICENSE (renamed from License.txt) | 0 | ||||
| -rw-r--r-- | README.md (renamed from README.txt) | 44 | ||||
| -rw-r--r-- | SECURITY.md | 66 | ||||
| -rw-r--r-- | deny.toml | 241 | ||||
| -rw-r--r-- | supply-chain/README.md | 149 | ||||
| -rw-r--r-- | supply-chain/audits.toml | 38 | ||||
| -rw-r--r-- | supply-chain/config.toml | 226 | ||||
| -rw-r--r-- | supply-chain/imports.lock | 472 |
18 files changed, 1971 insertions, 14 deletions
diff --git a/.github/DOCS.md b/.github/DOCS.md new file mode 100644 index 000000000..e932784c7 --- /dev/null +++ b/.github/DOCS.md | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # Github config and workflows | ||
| 2 | |||
| 3 | In this folder there is configuration for codecoverage, dependabot, and ci | ||
| 4 | workflows that check the library more deeply than the default configurations. | ||
| 5 | |||
| 6 | This folder can be or was merged using a --allow-unrelated-histories merge | ||
| 7 | strategy from <https://github.com/jonhoo/rust-ci-conf/> which provides a | ||
| 8 | reasonably sensible base for writing your own ci on. By using this strategy | ||
| 9 | the history of the CI repo is included in your repo, and future updates to | ||
| 10 | the CI can be merged later. | ||
| 11 | |||
| 12 | To perform this merge run: | ||
| 13 | |||
| 14 | ```shell | ||
| 15 | git remote add ci https://github.com/jonhoo/rust-ci-conf.git | ||
| 16 | git fetch ci | ||
| 17 | git merge --allow-unrelated-histories ci/main | ||
| 18 | ``` | ||
| 19 | |||
| 20 | An overview of the files in this project is available at: | ||
| 21 | <https://www.youtube.com/watch?v=xUH-4y92jPg&t=491s>, which contains some | ||
| 22 | rationale for decisions and runs through an example of solving minimal version | ||
| 23 | and OpenSSL issues. | ||
diff --git a/.github/codecov.yml b/.github/codecov.yml new file mode 100644 index 000000000..cd5ce8fc1 --- /dev/null +++ b/.github/codecov.yml | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | # ref: https://docs.codecov.com/docs/codecovyml-reference | ||
| 2 | coverage: | ||
| 3 | # Hold ourselves to a high bar | ||
| 4 | range: 85..100 | ||
| 5 | round: down | ||
| 6 | precision: 1 | ||
| 7 | status: | ||
| 8 | # ref: https://docs.codecov.com/docs/commit-status | ||
| 9 | project: | ||
| 10 | default: | ||
| 11 | # Avoid false negatives | ||
| 12 | threshold: 1% | ||
| 13 | |||
| 14 | # Test files aren't important for coverage | ||
| 15 | ignore: | ||
| 16 | - "tests" | ||
| 17 | |||
| 18 | # Make comments less noisy | ||
| 19 | comment: | ||
| 20 | layout: "files" | ||
| 21 | require_changes: true | ||
diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..d0f091e7b --- /dev/null +++ b/.github/dependabot.yml | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | version: 2 | ||
| 2 | updates: | ||
| 3 | - package-ecosystem: github-actions | ||
| 4 | directory: / | ||
| 5 | schedule: | ||
| 6 | interval: daily | ||
| 7 | - package-ecosystem: cargo | ||
| 8 | directory: / | ||
| 9 | schedule: | ||
| 10 | interval: daily | ||
| 11 | ignore: | ||
| 12 | - dependency-name: "*" | ||
| 13 | # patch and minor updates don't matter for libraries as consumers of this library build | ||
| 14 | # with their own lockfile, rather than the version specified in this library's lockfile | ||
| 15 | # remove this ignore rule if your package has binaries to ensure that the binaries are | ||
| 16 | # built with the exact set of dependencies and those are up to date. | ||
| 17 | update-types: | ||
| 18 | - "version-update:semver-patch" | ||
| 19 | - "version-update:semver-minor" | ||
diff --git a/.github/workflows/cargo-vet-pr-comment.yml b/.github/workflows/cargo-vet-pr-comment.yml new file mode 100644 index 000000000..dd8ef37a6 --- /dev/null +++ b/.github/workflows/cargo-vet-pr-comment.yml | |||
| @@ -0,0 +1,137 @@ | |||
| 1 | # This workflow triggers after cargo-vet workflow has run. | ||
| 2 | # It adds a comment to the PR with the results of the cargo vet run. | ||
| 3 | # It first adds a comment if the cargo vet run fails, | ||
| 4 | # and updates the comment if the cargo vet run succeeds after having failed at least once. | ||
| 5 | |||
| 6 | name: Cargo vet PR comment | ||
| 7 | |||
| 8 | on: | ||
| 9 | workflow_run: | ||
| 10 | workflows: [cargo-vet] | ||
| 11 | types: | ||
| 12 | - completed | ||
| 13 | |||
| 14 | permissions: | ||
| 15 | contents: read | ||
| 16 | pull-requests: write | ||
| 17 | |||
| 18 | concurrency: | ||
| 19 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| 20 | cancel-in-progress: true | ||
| 21 | |||
| 22 | jobs: | ||
| 23 | |||
| 24 | find-pr-comment: | ||
| 25 | # This job runs when the cargo-vet job fails or succeeds | ||
| 26 | # It will download the artifact from the failed job and post a comment on the PR | ||
| 27 | runs-on: ubuntu-latest | ||
| 28 | outputs: | ||
| 29 | comment-id: ${{ steps.get-comment-id.outputs.comment-id }} | ||
| 30 | pr-number: ${{ steps.get-pr-number.outputs.pr_number }} | ||
| 31 | if: github.event.workflow_run.event == 'pull_request' | ||
| 32 | steps: | ||
| 33 | - name: 'Download artifact' | ||
| 34 | uses: actions/download-artifact@v4 | ||
| 35 | with: | ||
| 36 | github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| 37 | name: pr | ||
| 38 | path: pr/ | ||
| 39 | run-id: ${{ github.event.workflow_run.id }} | ||
| 40 | |||
| 41 | - name: 'Get PR number' | ||
| 42 | id: get-pr-number | ||
| 43 | run: echo "pr_number=$(cat ./pr/NR)" >> $GITHUB_OUTPUT | ||
| 44 | |||
| 45 | - name: 'Find existing comment' | ||
| 46 | id: find-comment | ||
| 47 | uses: peter-evans/find-comment@v3 | ||
| 48 | with: | ||
| 49 | issue-number: ${{ steps.get-pr-number.outputs.pr_number }} | ||
| 50 | comment-author: 'github-actions[bot]' | ||
| 51 | body-includes: 'comment-tag: [cargo-vet]' | ||
| 52 | |||
| 53 | - name: 'Get comment ID' | ||
| 54 | id: get-comment-id | ||
| 55 | if: ${{ steps.find-comment.outputs.comment-id != '' }} | ||
| 56 | run: echo "comment-id=${{ steps.find-comment.outputs.comment-id }}" >> $GITHUB_OUTPUT | ||
| 57 | |||
| 58 | post-comment-failure: | ||
| 59 | # This job runs when the cargo-vet job fails | ||
| 60 | # It will download the artifact from the failed job and post a comment on the PR | ||
| 61 | runs-on: ubuntu-latest | ||
| 62 | needs: find-pr-comment | ||
| 63 | if: github.event.workflow_run.conclusion == 'failure' | ||
| 64 | steps: | ||
| 65 | - name: 'Comment on PR - Failure' | ||
| 66 | uses: peter-evans/create-or-update-comment@v4 | ||
| 67 | with: | ||
| 68 | comment-id: ${{ needs.find-pr-comment.outputs.comment-id }} | ||
| 69 | issue-number: ${{ needs.find-pr-comment.outputs.pr-number }} | ||
| 70 | body: | | ||
| 71 | # Cargo Vet Audit Failed | ||
| 72 | |||
| 73 | `cargo vet` has failed in this PR. Please run `cargo vet --locked` locally to check for new or updated unvetted dependencies. | ||
| 74 | Details about the vetting process can be found in [supply-chain/README.md](../blob/main/supply-chain/README.md) | ||
| 75 | |||
| 76 | ## If the unvetted dependencies are not needed | ||
| 77 | Please modify Cargo.toml file to avoid including the dependencies. | ||
| 78 | |||
| 79 | ## If the unvetted dependencies are needed | ||
| 80 | Post a new comment with the questionnaire below to the PR to help the auditors vet the dependencies. | ||
| 81 | After the auditors have vetted the dependencies, the PR will need to be rebased to pick up the new audits and pass this check. | ||
| 82 | |||
| 83 | ### Copy and paste the questionnaire as a new comment and provide your answers: | ||
| 84 | |||
| 85 | **1. What crates (with version) need to be audited?** | ||
| 86 | |||
| 87 | **2. How many of the crates are version updates vs new dependencies?** | ||
| 88 | |||
| 89 | **3. To confirm none of the already included crates serve your needs, please provide a brief description of the purpose of the new crates.** | ||
| 90 | |||
| 91 | **4. Any extra notes to the auditors to help with their audits.** | ||
| 92 | |||
| 93 | <!-- | ||
| 94 | This comment is auto-generated by the cargo-vet workflow. | ||
| 95 | Please do not edit it directly. | ||
| 96 | |||
| 97 | comment-tag: [cargo-vet] | ||
| 98 | --> | ||
| 99 | edit-mode: replace | ||
| 100 | |||
| 101 | - name: 'Label PR' | ||
| 102 | uses: actions/github-script@v7 | ||
| 103 | with: | ||
| 104 | script: | | ||
| 105 | github.rest.issues.addLabels({ | ||
| 106 | issue_number: ${{ needs.find-pr-comment.outputs.pr-number }}, | ||
| 107 | owner: context.repo.owner, | ||
| 108 | repo: context.repo.repo, | ||
| 109 | labels: ['cargo vet'] | ||
| 110 | }) | ||
| 111 | |||
| 112 | post-comment-success: | ||
| 113 | # This job runs when the cargo-vet job succeeds | ||
| 114 | # It will update the comment on the PR with a success message | ||
| 115 | runs-on: ubuntu-latest | ||
| 116 | needs: find-pr-comment | ||
| 117 | if: github.event.workflow_run.conclusion == 'success' | ||
| 118 | steps: | ||
| 119 | - name: 'Comment on PR - Success' | ||
| 120 | # Only update the comment if it exists | ||
| 121 | # This is to avoid creating a new comment if the cargo-vet job has never failed before | ||
| 122 | if: ${{ needs.find-pr-comment.outputs.comment-id }} | ||
| 123 | uses: peter-evans/create-or-update-comment@v4 | ||
| 124 | with: | ||
| 125 | comment-id: ${{ needs.find-pr-comment.outputs.comment-id }} | ||
| 126 | issue-number: ${{ needs.find-pr-comment.outputs.pr-number }} | ||
| 127 | body: | | ||
| 128 | # Cargo Vet Audit Passed | ||
| 129 | `cargo vet` has passed in this PR. No new unvetted dependencies were found. | ||
| 130 | |||
| 131 | <!-- | ||
| 132 | This comment is auto-generated by the cargo-vet workflow. | ||
| 133 | Please do not edit it directly. | ||
| 134 | |||
| 135 | comment-tag: [cargo-vet] | ||
| 136 | --> | ||
| 137 | edit-mode: replace \ No newline at end of file | ||
diff --git a/.github/workflows/cargo-vet.yml b/.github/workflows/cargo-vet.yml new file mode 100644 index 000000000..864c138e9 --- /dev/null +++ b/.github/workflows/cargo-vet.yml | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | # This workflow runs whenever a PR is opened or updated. It runs cargo vet to check for unvetted dependencies in the Cargo.lock file. | ||
| 2 | permissions: | ||
| 3 | contents: read | ||
| 4 | on: | ||
| 5 | pull_request: | ||
| 6 | |||
| 7 | concurrency: | ||
| 8 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| 9 | cancel-in-progress: true | ||
| 10 | |||
| 11 | name: cargo-vet | ||
| 12 | jobs: | ||
| 13 | vet: | ||
| 14 | # cargo-vet checks for unvetted dependencies in the Cargo.lock file | ||
| 15 | # This is to ensure that new dependencies are vetted before they are added to the project | ||
| 16 | name: vet-dependencies | ||
| 17 | runs-on: ubuntu-latest | ||
| 18 | env: | ||
| 19 | CARGO_VET_VERSION: 0.10.1 | ||
| 20 | |||
| 21 | steps: | ||
| 22 | - uses: actions/checkout@v4 | ||
| 23 | with: | ||
| 24 | submodules: true | ||
| 25 | |||
| 26 | - uses: actions/cache@v4 | ||
| 27 | with: | ||
| 28 | path: ${{ runner.tool_cache }}/cargo-vet | ||
| 29 | key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }} | ||
| 30 | |||
| 31 | - name: Add the tool cache directory to the search path | ||
| 32 | run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH | ||
| 33 | |||
| 34 | - name: Ensure that the tool cache is populated with the cargo-vet binary | ||
| 35 | run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet | ||
| 36 | |||
| 37 | - name: Invoke cargo-vet | ||
| 38 | run: cargo vet --locked | ||
| 39 | |||
| 40 | - name: Save PR number | ||
| 41 | # PR number is saved as an artifact so it can be used to determine the PR to comment on by the vet-pr-comment workflow | ||
| 42 | # vet-pr-comment workflow is triggered by the workflow_run event so it runs in the context of the base branch and not the PR branch | ||
| 43 | if: ${{ failure() }} || ${{ success() }} | ||
| 44 | run: | | ||
| 45 | mkdir -p ./pr | ||
| 46 | echo ${{ github.event.number }} > ./pr/NR | ||
| 47 | - uses: actions/upload-artifact@v4 | ||
| 48 | # Need to upload the artifact in both success and failure cases so comment can be updated in either case | ||
| 49 | if: ${{ failure() }} || ${{ success() }} | ||
| 50 | with: | ||
| 51 | name: pr | ||
| 52 | path: pr/ | ||
| 53 | overwrite: true \ No newline at end of file | ||
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 000000000..1a09a1492 --- /dev/null +++ b/.github/workflows/check.yml | |||
| @@ -0,0 +1,205 @@ | |||
| 1 | # This workflow runs whenever a PR is opened or updated, or a commit is pushed to main. It runs | ||
| 2 | # several checks: | ||
| 3 | # - fmt: checks that the code is formatted according to rustfmt | ||
| 4 | # - clippy: checks that the code does not contain any clippy warnings | ||
| 5 | # - doc: checks that the code can be documented without errors | ||
| 6 | # - hack: check combinations of feature flags | ||
| 7 | # - msrv: check that the msrv specified in the crate is correct | ||
| 8 | permissions: | ||
| 9 | contents: read | ||
| 10 | |||
| 11 | # This configuration allows maintainers of this repo to create a branch and pull request based on | ||
| 12 | # the new branch. Restricting the push trigger to the main branch ensures that the PR only gets | ||
| 13 | # built once. | ||
| 14 | on: | ||
| 15 | |||
| 16 | push: | ||
| 17 | branches: [main, main-nextgen] | ||
| 18 | pull_request: | ||
| 19 | |||
| 20 | # If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that | ||
| 21 | # we don't waste CI time, and returns results quicker https://github.com/jonhoo/rust-ci-conf/pull/5 | ||
| 22 | concurrency: | ||
| 23 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| 24 | cancel-in-progress: true | ||
| 25 | |||
| 26 | name: check | ||
| 27 | |||
| 28 | jobs: | ||
| 29 | |||
| 30 | fmt: | ||
| 31 | runs-on: ubuntu-latest | ||
| 32 | name: nightly / fmt | ||
| 33 | |||
| 34 | strategy: | ||
| 35 | fail-fast: false | ||
| 36 | matrix: | ||
| 37 | workdir: [ ".", "examples/rt633", "examples/rt685s-evk",] | ||
| 38 | |||
| 39 | steps: | ||
| 40 | - uses: actions/checkout@v4 | ||
| 41 | with: | ||
| 42 | submodules: true | ||
| 43 | |||
| 44 | - name: Install nightly | ||
| 45 | uses: dtolnay/rust-toolchain@nightly | ||
| 46 | with: | ||
| 47 | components: rustfmt | ||
| 48 | |||
| 49 | - name: cargo fmt --check | ||
| 50 | run: cargo fmt --check | ||
| 51 | working-directory: ${{ matrix.workdir }} | ||
| 52 | |||
| 53 | clippy-examples: | ||
| 54 | runs-on: ubuntu-latest | ||
| 55 | name: ${{ matrix.toolchain }} / clippy | ||
| 56 | |||
| 57 | permissions: | ||
| 58 | contents: read | ||
| 59 | checks: write | ||
| 60 | |||
| 61 | strategy: | ||
| 62 | fail-fast: false | ||
| 63 | matrix: | ||
| 64 | # Get early warning of new lints which are regularly introduced in beta channels. | ||
| 65 | toolchain: [stable] | ||
| 66 | workdir: ["examples"] | ||
| 67 | |||
| 68 | steps: | ||
| 69 | - uses: actions/checkout@v4 | ||
| 70 | with: | ||
| 71 | submodules: true | ||
| 72 | |||
| 73 | - name: Install ${{ matrix.toolchain }} | ||
| 74 | uses: dtolnay/rust-toolchain@master | ||
| 75 | with: | ||
| 76 | toolchain: ${{ matrix.toolchain }} | ||
| 77 | components: clippy | ||
| 78 | |||
| 79 | - name: cargo clippy | ||
| 80 | working-directory: ${{ matrix.workdir }} | ||
| 81 | run: | | ||
| 82 | cargo clippy --locked -- -Dwarnings -D clippy::suspicious -D clippy::correctness -D clippy::perf -D clippy::style | ||
| 83 | |||
| 84 | # Enable once we have a released crate | ||
| 85 | # semver: | ||
| 86 | # runs-on: ubuntu-latest | ||
| 87 | # name: semver | ||
| 88 | # steps: | ||
| 89 | # - uses: actions/checkout@v4 | ||
| 90 | # with: | ||
| 91 | # submodules: true | ||
| 92 | # - name: Install stable | ||
| 93 | # uses: dtolnay/rust-toolchain@stable | ||
| 94 | # with: | ||
| 95 | # components: rustfmt | ||
| 96 | # - name: cargo-semver-checks | ||
| 97 | # uses: obi1kenobi/cargo-semver-checks-action@v2 | ||
| 98 | |||
| 99 | doc: | ||
| 100 | # run docs generation on nightly rather than stable. This enables features like | ||
| 101 | # https://doc.rust-lang.org/beta/unstable-book/language-features/doc-cfg.html which allows an | ||
| 102 | # API be documented as only available in some specific platforms. | ||
| 103 | runs-on: ubuntu-latest | ||
| 104 | name: nightly / doc | ||
| 105 | |||
| 106 | steps: | ||
| 107 | - uses: actions/checkout@v4 | ||
| 108 | with: | ||
| 109 | submodules: true | ||
| 110 | |||
| 111 | - name: Install nightly | ||
| 112 | uses: dtolnay/rust-toolchain@nightly | ||
| 113 | |||
| 114 | - name: cargo doc | ||
| 115 | run: | | ||
| 116 | cargo doc --no-deps --all-features --locked | ||
| 117 | env: | ||
| 118 | RUSTDOCFLAGS: --cfg docsrs | ||
| 119 | |||
| 120 | hack: | ||
| 121 | # cargo-hack checks combinations of feature flags to ensure that features are all additive | ||
| 122 | # which is required for feature unification | ||
| 123 | runs-on: ubuntu-latest | ||
| 124 | name: ubuntu / stable / features | ||
| 125 | |||
| 126 | strategy: | ||
| 127 | fail-fast: false | ||
| 128 | |||
| 129 | steps: | ||
| 130 | - uses: actions/checkout@v4 | ||
| 131 | with: | ||
| 132 | submodules: true | ||
| 133 | |||
| 134 | - name: Install stable | ||
| 135 | uses: dtolnay/rust-toolchain@stable | ||
| 136 | with: | ||
| 137 | toolchain: stable | ||
| 138 | components: clippy | ||
| 139 | |||
| 140 | - name: rustup target add thumbv8m.main-none-eabihf | ||
| 141 | run: rustup target add thumbv8m.main-none-eabihf | ||
| 142 | |||
| 143 | - name: cargo hack | ||
| 144 | run: cargo hack --feature-powerset check | ||
| 145 | |||
| 146 | deny: | ||
| 147 | # cargo-deny checks licenses, advisories, sources, and bans for | ||
| 148 | # our dependencies. | ||
| 149 | runs-on: ubuntu-latest | ||
| 150 | name: ubuntu / stable / deny | ||
| 151 | |||
| 152 | steps: | ||
| 153 | - uses: actions/checkout@v4 | ||
| 154 | with: | ||
| 155 | submodules: true | ||
| 156 | |||
| 157 | - name: Install stable | ||
| 158 | uses: dtolnay/rust-toolchain@stable | ||
| 159 | |||
| 160 | - name: cargo install cargo-deny | ||
| 161 | uses: EmbarkStudios/cargo-deny-action@v2 | ||
| 162 | with: | ||
| 163 | log-level: warn | ||
| 164 | manifest-path: ./Cargo.toml | ||
| 165 | command: check | ||
| 166 | arguments: --all-features --locked | ||
| 167 | |||
| 168 | msrv: | ||
| 169 | # check that we can build using the minimal rust version that is specified by this crate | ||
| 170 | runs-on: ubuntu-latest | ||
| 171 | # we use a matrix here just because env can't be used in job names | ||
| 172 | # https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability | ||
| 173 | strategy: | ||
| 174 | fail-fast: false | ||
| 175 | matrix: | ||
| 176 | msrv: ["1.90"] # We're relying on namespaced-features, which | ||
| 177 | # was released in 1.60 | ||
| 178 | # | ||
| 179 | # We also depend on `fixed' which requires rust | ||
| 180 | # 1.71 | ||
| 181 | # | ||
| 182 | # Additionally, we depend on embedded-hal-async | ||
| 183 | # which requires 1.75 | ||
| 184 | # | ||
| 185 | # embassy-time requires 1.79 due to | ||
| 186 | # collapse_debuginfo | ||
| 187 | # | ||
| 188 | # embassy upstream switched to rust 1.85 | ||
| 189 | # | ||
| 190 | # unsigned_is_multiple_of requires 1.90, else we get clippy warnings | ||
| 191 | |||
| 192 | name: ubuntu / ${{ matrix.msrv }} | ||
| 193 | steps: | ||
| 194 | - uses: actions/checkout@v4 | ||
| 195 | with: | ||
| 196 | submodules: true | ||
| 197 | |||
| 198 | - name: Install ${{ matrix.msrv }} | ||
| 199 | uses: dtolnay/rust-toolchain@master | ||
| 200 | with: | ||
| 201 | toolchain: ${{ matrix.msrv }} | ||
| 202 | |||
| 203 | - name: cargo +${{ matrix.msrv }} check | ||
| 204 | run: | | ||
| 205 | cargo check --all-features --locked | ||
diff --git a/.github/workflows/nostd.yml b/.github/workflows/nostd.yml new file mode 100644 index 000000000..92460bd0f --- /dev/null +++ b/.github/workflows/nostd.yml | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | # This workflow checks whether the library is able to run without the std library (e.g., embedded). | ||
| 2 | # This entire file should be removed if this crate does not support no-std. See check.yml for | ||
| 3 | # information about how the concurrency cancellation and workflow triggering works | ||
| 4 | permissions: | ||
| 5 | contents: read | ||
| 6 | |||
| 7 | on: | ||
| 8 | push: | ||
| 9 | branches: [main, main-nextgen] | ||
| 10 | pull_request: | ||
| 11 | |||
| 12 | concurrency: | ||
| 13 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| 14 | cancel-in-progress: true | ||
| 15 | |||
| 16 | name: no-std | ||
| 17 | |||
| 18 | jobs: | ||
| 19 | nostd: | ||
| 20 | runs-on: ubuntu-latest | ||
| 21 | name: ${{ matrix.target }} | ||
| 22 | |||
| 23 | strategy: | ||
| 24 | matrix: | ||
| 25 | target: [thumbv8m.main-none-eabihf] | ||
| 26 | |||
| 27 | steps: | ||
| 28 | - uses: actions/checkout@v4 | ||
| 29 | with: | ||
| 30 | submodules: true | ||
| 31 | |||
| 32 | - name: Install stable | ||
| 33 | uses: dtolnay/rust-toolchain@stable | ||
| 34 | |||
| 35 | - name: rustup target add ${{ matrix.target }} | ||
| 36 | run: rustup target add ${{ matrix.target }} | ||
| 37 | |||
| 38 | - name: Show variable | ||
| 39 | run: echo ${{ env.TOKEN }} | ||
| 40 | |||
| 41 | - name: cargo check | ||
| 42 | run: | | ||
| 43 | cargo check --target ${{ matrix.target }} --all-features --locked | ||
diff --git a/.github/workflows/rolling.yml b/.github/workflows/rolling.yml new file mode 100644 index 000000000..f572954f9 --- /dev/null +++ b/.github/workflows/rolling.yml | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | # This workflow runs every morning at midnight. It will run cargo hack | ||
| 2 | # and a build with msrv. If any dependency breaks our crate, we will | ||
| 3 | # know ASAP. | ||
| 4 | # | ||
| 5 | # - check: build with all features | ||
| 6 | # - msrv: check that the msrv specified in the crate is correct | ||
| 7 | permissions: | ||
| 8 | contents: read | ||
| 9 | |||
| 10 | on: | ||
| 11 | schedule: | ||
| 12 | - cron: '0 0 * * *' | ||
| 13 | |||
| 14 | name: rolling | ||
| 15 | jobs: | ||
| 16 | |||
| 17 | check: | ||
| 18 | runs-on: ubuntu-latest | ||
| 19 | name: ubuntu / stable / features | ||
| 20 | strategy: | ||
| 21 | fail-fast: false | ||
| 22 | steps: | ||
| 23 | - uses: actions/checkout@v4 | ||
| 24 | with: | ||
| 25 | submodules: true | ||
| 26 | - name: Install stable | ||
| 27 | uses: dtolnay/rust-toolchain@stable | ||
| 28 | - name: cargo install cargo-hack | ||
| 29 | uses: taiki-e/install-action@cargo-hack | ||
| 30 | - name: cargo check | ||
| 31 | run: | | ||
| 32 | cargo update | ||
| 33 | cargo check --all-features check | ||
| 34 | |||
| 35 | msrv: | ||
| 36 | runs-on: ubuntu-latest | ||
| 37 | strategy: | ||
| 38 | fail-fast: false | ||
| 39 | matrix: | ||
| 40 | msrv: ["1.85"] # We're relying on namespaced-features, which | ||
| 41 | # was released in 1.60 | ||
| 42 | # | ||
| 43 | # We also depend on `fixed' which requires rust | ||
| 44 | # 1.71 | ||
| 45 | # | ||
| 46 | # Additionally, we depend on embedded-hal-async | ||
| 47 | # which requires 1.75 | ||
| 48 | # | ||
| 49 | # embassy-time requires 1.79 due to | ||
| 50 | # collapse_debuginfo | ||
| 51 | # | ||
| 52 | # embassy upstream switched to rust 1.83 | ||
| 53 | # | ||
| 54 | # embedded-services (storage bus) dependency | ||
| 55 | # requires 1.85 | ||
| 56 | name: ubuntu / ${{ matrix.msrv }} (${{ matrix.commit }}) | ||
| 57 | steps: | ||
| 58 | - uses: actions/checkout@v4 | ||
| 59 | with: | ||
| 60 | submodules: true | ||
| 61 | - name: Install ${{ matrix.msrv }} | ||
| 62 | uses: dtolnay/rust-toolchain@master | ||
| 63 | with: | ||
| 64 | toolchain: ${{ matrix.msrv }} | ||
| 65 | - name: cargo +${{ matrix.msrv }} check | ||
| 66 | run: | | ||
| 67 | cargo update | ||
| 68 | cargo check --all-features check | ||
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..54a673e04 --- /dev/null +++ b/CODE_OF_CONDUCT.md | |||
| @@ -0,0 +1,132 @@ | |||
| 1 | # Contributor Covenant Code of Conduct | ||
| 2 | |||
| 3 | ## Our Pledge | ||
| 4 | |||
| 5 | We as members, contributors, and leaders pledge to make participation in our | ||
| 6 | community a harassment-free experience for everyone, regardless of age, body | ||
| 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
| 8 | identity and expression, level of experience, education, socio-economic status, | ||
| 9 | nationality, personal appearance, race, caste, color, religion, or sexual | ||
| 10 | identity and orientation. | ||
| 11 | |||
| 12 | We pledge to act and interact in ways that contribute to an open, welcoming, | ||
| 13 | diverse, inclusive, and healthy community. | ||
| 14 | |||
| 15 | ## Our Standards | ||
| 16 | |||
| 17 | Examples of behavior that contributes to a positive environment for our | ||
| 18 | community include: | ||
| 19 | |||
| 20 | * Demonstrating empathy and kindness toward other people | ||
| 21 | * Being respectful of differing opinions, viewpoints, and experiences | ||
| 22 | * Giving and gracefully accepting constructive feedback | ||
| 23 | * Accepting responsibility and apologizing to those affected by our mistakes, | ||
| 24 | and learning from the experience | ||
| 25 | * Focusing on what is best not just for us as individuals, but for the overall | ||
| 26 | community | ||
| 27 | |||
| 28 | Examples of unacceptable behavior include: | ||
| 29 | |||
| 30 | * The use of sexualized language or imagery, and sexual attention or advances of | ||
| 31 | any kind | ||
| 32 | * Trolling, insulting or derogatory comments, and personal or political attacks | ||
| 33 | * Public or private harassment | ||
| 34 | * Publishing others' private information, such as a physical or email address, | ||
| 35 | without their explicit permission | ||
| 36 | * Other conduct which could reasonably be considered inappropriate in a | ||
| 37 | professional setting | ||
| 38 | |||
| 39 | ## Enforcement Responsibilities | ||
| 40 | |||
| 41 | Community leaders are responsible for clarifying and enforcing our standards of | ||
| 42 | acceptable behavior and will take appropriate and fair corrective action in | ||
| 43 | response to any behavior that they deem inappropriate, threatening, offensive, | ||
| 44 | or harmful. | ||
| 45 | |||
| 46 | Community leaders have the right and responsibility to remove, edit, or reject | ||
| 47 | comments, commits, code, wiki edits, issues, and other contributions that are | ||
| 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation | ||
| 49 | decisions when appropriate. | ||
| 50 | |||
| 51 | ## Scope | ||
| 52 | |||
| 53 | This Code of Conduct applies within all community spaces, and also applies when | ||
| 54 | an individual is officially representing the community in public spaces. | ||
| 55 | Examples of representing our community include using an official e-mail address, | ||
| 56 | posting via an official social media account, or acting as an appointed | ||
| 57 | representative at an online or offline event. | ||
| 58 | |||
| 59 | ## Enforcement | ||
| 60 | |||
| 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
| 62 | reported to the community leaders responsible for enforcement at | ||
| 63 | [email protected]. | ||
| 64 | All complaints will be reviewed and investigated promptly and fairly. | ||
| 65 | |||
| 66 | All community leaders are obligated to respect the privacy and security of the | ||
| 67 | reporter of any incident. | ||
| 68 | |||
| 69 | ## Enforcement Guidelines | ||
| 70 | |||
| 71 | Community leaders will follow these Community Impact Guidelines in determining | ||
| 72 | the consequences for any action they deem in violation of this Code of Conduct: | ||
| 73 | |||
| 74 | ### 1. Correction | ||
| 75 | |||
| 76 | **Community Impact**: Use of inappropriate language or other behavior deemed | ||
| 77 | unprofessional or unwelcome in the community. | ||
| 78 | |||
| 79 | **Consequence**: A private, written warning from community leaders, providing | ||
| 80 | clarity around the nature of the violation and an explanation of why the | ||
| 81 | behavior was inappropriate. A public apology may be requested. | ||
| 82 | |||
| 83 | ### 2. Warning | ||
| 84 | |||
| 85 | **Community Impact**: A violation through a single incident or series of | ||
| 86 | actions. | ||
| 87 | |||
| 88 | **Consequence**: A warning with consequences for continued behavior. No | ||
| 89 | interaction with the people involved, including unsolicited interaction with | ||
| 90 | those enforcing the Code of Conduct, for a specified period of time. This | ||
| 91 | includes avoiding interactions in community spaces as well as external channels | ||
| 92 | like social media. Violating these terms may lead to a temporary or permanent | ||
| 93 | ban. | ||
| 94 | |||
| 95 | ### 3. Temporary Ban | ||
| 96 | |||
| 97 | **Community Impact**: A serious violation of community standards, including | ||
| 98 | sustained inappropriate behavior. | ||
| 99 | |||
| 100 | **Consequence**: A temporary ban from any sort of interaction or public | ||
| 101 | communication with the community for a specified period of time. No public or | ||
| 102 | private interaction with the people involved, including unsolicited interaction | ||
| 103 | with those enforcing the Code of Conduct, is allowed during this period. | ||
| 104 | Violating these terms may lead to a permanent ban. | ||
| 105 | |||
| 106 | ### 4. Permanent Ban | ||
| 107 | |||
| 108 | **Community Impact**: Demonstrating a pattern of violation of community | ||
| 109 | standards, including sustained inappropriate behavior, harassment of an | ||
| 110 | individual, or aggression toward or disparagement of classes of individuals. | ||
| 111 | |||
| 112 | **Consequence**: A permanent ban from any sort of public interaction within the | ||
| 113 | community. | ||
| 114 | |||
| 115 | ## Attribution | ||
| 116 | |||
| 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
| 118 | version 2.1, available at | ||
| 119 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. | ||
| 120 | |||
| 121 | Community Impact Guidelines were inspired by | ||
| 122 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. | ||
| 123 | |||
| 124 | For answers to common questions about this code of conduct, see the FAQ at | ||
| 125 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at | ||
| 126 | [https://www.contributor-covenant.org/translations][translations]. | ||
| 127 | |||
| 128 | [homepage]: https://www.contributor-covenant.org | ||
| 129 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html | ||
| 130 | [Mozilla CoC]: https://github.com/mozilla/diversity | ||
| 131 | [FAQ]: https://www.contributor-covenant.org/faq | ||
| 132 | [translations]: https://www.contributor-covenant.org/translations | ||
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..7c8289a58 --- /dev/null +++ b/CONTRIBUTING.md | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | # Contributing to Open Device Partnership | ||
| 2 | |||
| 3 | The Open Device Partnership project welcomes your suggestions and contributions! Before opening your first issue or pull request, please review our | ||
| 4 | [Code of Conduct](CODE_OF_CONDUCT.md) to understand how our community interacts in an inclusive and respectful manner. | ||
| 5 | |||
| 6 | ## Contribution Licensing | ||
| 7 | |||
| 8 | Most of our code is distributed under the terms of the [MIT license](LICENSE), and when you contribute code that you wrote to our repositories, | ||
| 9 | you agree that you are contributing under those same terms. In addition, by submitting your contributions you are indicating that | ||
| 10 | you have the right to submit those contributions under those terms. | ||
| 11 | |||
| 12 | ## Other Contribution Information | ||
| 13 | |||
| 14 | If you wish to contribute code or documentation authored by others, or using the terms of any other license, please indicate that clearly in your | ||
| 15 | pull request so that the project team can discuss the situation with you. | ||
| 16 | |||
| 17 | # Contribution Guideline | ||
| 18 | |||
| 19 | * For any new HAL driver added, please add corresponding test in the examples | ||
| 20 | * Format the code with `cargo fmt`. Or better yet, enable format on save in your IDE for rust source files. | ||
| 21 | * Use meaningful commit messages. See [this blogpost](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) | ||
| 22 | |||
| 23 | # PR Etiquette | ||
| 24 | |||
| 25 | * Create a draft PR first | ||
| 26 | * Make sure that your branch has `.github` folder and all the code linting/sanity check workflows are passing in your draft PR before sending it out to code reviewers. | ||
| 27 | |||
| 28 | # Careful Use of `Unsafe` | ||
| 29 | |||
| 30 | Working with embedded, using of `unsafe` is a necessity. However, please wrap unsafe code with safe interfaces to prevent `unsafe` keyword being sprinkled everywhere. | ||
| 31 | |||
| 32 | # RFC Draft PR | ||
| 33 | |||
| 34 | If you want feedback on your design or HAL driver early, please create a draft PR with title prefix `RFC:`. | ||
| 35 | |||
| 36 | # Branch Naming Scheme | ||
| 37 | |||
| 38 | For now, we're not using forks. Eventually a personal fork will be required for any PRs to limit the amount of people with merge access to the main branch. Until that happens, please use meaningful branch names like this `user_alias/feature` and avoid sending PRs from branches containing prefixes such as "wip", "test", etc. Prior to sending a PR, please rename the branch. | ||
| 39 | |||
| 40 | # Clean Commit History | ||
| 41 | |||
| 42 | We disabled squashing of commit and would like to maintain a clean commit history. So please reorganize your commits with the following items: | ||
| 43 | * Each commit builds successfully without warning from `rustc` or `clippy` | ||
| 44 | * Miscellaneous commits to fix typos + formatting are squashed | ||
| 45 | |||
| 46 | # Regressions | ||
| 47 | |||
| 48 | When reporting a regression, please ensure that you use `git bisect` to find the first offending commit, as that will help us finding the culprit a lot faster. | ||
| @@ -1,6 +1,8 @@ | |||
| 1 | # Embassy MCXA276 HAL | 1 | # Embassy MCXA276 HAL |
| 2 | 2 | ||
| 3 | A Hardware Abstraction Layer (HAL) for the NXP MCXA276 microcontroller using the Embassy async framework. This HAL provides safe, idiomatic Rust interfaces for GPIO, UART, and OSTIMER peripherals. | 3 | A Hardware Abstraction Layer (HAL) for the NXP MCXA276 microcontroller |
| 4 | using the Embassy async framework. This HAL provides safe, idiomatic | ||
| 5 | Rust interfaces for GPIO, UART, and OSTIMER peripherals. | ||
| 4 | 6 | ||
| 5 | ## Prerequisites | 7 | ## Prerequisites |
| 6 | 8 | ||
| @@ -36,8 +38,6 @@ cargo install probe-rs --features cli | |||
| 36 | - Install a serial terminal (e.g., Tera Term): https://ttssh2.osdn.jp/ | 38 | - Install a serial terminal (e.g., Tera Term): https://ttssh2.osdn.jp/ |
| 37 | - USB drivers: Windows 10/11 usually picks up the board as a USB CDC device automatically (COM port) | 39 | - USB drivers: Windows 10/11 usually picks up the board as a USB CDC device automatically (COM port) |
| 38 | 40 | ||
| 39 | |||
| 40 | |||
| 41 | ### Hardware Requirements | 41 | ### Hardware Requirements |
| 42 | 42 | ||
| 43 | - NXP FRDM-MCXA276 development board | 43 | - NXP FRDM-MCXA276 development board |
| @@ -108,10 +108,12 @@ PROBE=1fc9:0143:H3AYDQVQMTROB cargo run --features "lpuart2 ostimer0" --example | |||
| 108 | # RTC example | 108 | # RTC example |
| 109 | PROBE=1fc9:0143:H3AYDQVQMTROB cargo run --features "lpuart2 rtc0" --example rtc_alarm | 109 | PROBE=1fc9:0143:H3AYDQVQMTROB cargo run --features "lpuart2 rtc0" --example rtc_alarm |
| 110 | ``` | 110 | ``` |
| 111 | |||
| 111 | **Note:** All examples run from RAM, not flash memory. They are loaded directly into RAM for faster development iteration. | 112 | **Note:** All examples run from RAM, not flash memory. They are loaded directly into RAM for faster development iteration. |
| 112 | 113 | ||
| 113 | **Important:** After pressing the RESET button on the board, the first `cargo run` attempt may fail with a connection error. This is expected - simply run the command again and it will work. The run.sh script now properly sets the Vector Table Offset Register (VTOR) to point to the RAM-based vector table, ensuring the correct stack pointer and reset vector are used. | 114 | **Important:** After pressing the RESET button on the board, the first `cargo run` attempt may fail with a connection error. This is expected - simply run the command again and it will work. The run.sh script now properly sets the Vector Table Offset Register (VTOR) to point to the RAM-based vector table, ensuring the correct stack pointer and reset vector are used. |
| 114 | 115 | ||
| 116 | ```console | ||
| 115 | smw016108@smw016108:~/Downloads/nxp/rust/uart/embassy-mcxa276$ PROBE=1fc9:0143:H3AYDQVQMTROB cargo run --release --features "gpio ostimer0" --example blink | 117 | smw016108@smw016108:~/Downloads/nxp/rust/uart/embassy-mcxa276$ PROBE=1fc9:0143:H3AYDQVQMTROB cargo run --release --features "gpio ostimer0" --example blink |
| 116 | Finished `release` profile [optimized + debuginfo] target(s) in 0.07s | 118 | Finished `release` profile [optimized + debuginfo] target(s) in 0.07s |
| 117 | Running `/home/smw016108/Downloads/nxp/rust/uart/embassy-mcxa276/./run.sh target/thumbv8m.main-none-eabihf/release/examples/blink` | 119 | Running `/home/smw016108/Downloads/nxp/rust/uart/embassy-mcxa276/./run.sh target/thumbv8m.main-none-eabihf/release/examples/blink` |
| @@ -128,6 +130,7 @@ probe-rs gdb server failed to connect to target. Log: | |||
| 128 | smw016108@smw016108:~/Downloads/nxp/rust/uart/embassy-mcxa276$ PROBE=1fc9:0143:H3AYDQVQMTROB cargo run --release --features "gpio ostimer0" --example blink | 130 | smw016108@smw016108:~/Downloads/nxp/rust/uart/embassy-mcxa276$ PROBE=1fc9:0143:H3AYDQVQMTROB cargo run --release --features "gpio ostimer0" --example blink |
| 129 | Finished `release` profile [optimized + debuginfo] target(s) in 0.02s | 131 | Finished `release` profile [optimized + debuginfo] target(s) in 0.02s |
| 130 | Running `/home/smw016108/Downloads/nxp/rust/uart/embassy-mcxa276/./run.sh target/thumbv8m.main-none-eabihf/release/examples/blink` | 132 | Running `/home/smw016108/Downloads/nxp/rust/uart/embassy-mcxa276/./run.sh target/thumbv8m.main-none-eabihf/release/examples/blink` |
| 133 | ``` | ||
| 131 | 134 | ||
| 132 | ### Additional UART Examples | 135 | ### Additional UART Examples |
| 133 | 136 | ||
| @@ -150,6 +153,7 @@ Configures ADC1 channel A8 (pin P1_10) and prints conversion values to UART2 per | |||
| 150 | #### `adc_interrupt` | 153 | #### `adc_interrupt` |
| 151 | Triggers a conversion and signals completion via ADC1 interrupt, printing a notification on UART2. | 154 | Triggers a conversion and signals completion via ADC1 interrupt, printing a notification on UART2. |
| 152 | 155 | ||
| 156 | ```console | ||
| 153 | 0x20002040 in ?? () | 157 | 0x20002040 in ?? () |
| 154 | Supported Commands: | 158 | Supported Commands: |
| 155 | 159 | ||
| @@ -163,8 +167,11 @@ Loading section .Reset, size 0x58 lma 0x20000ba4 | |||
| 163 | Loading section .rodata, size 0x28 lma 0x20000bfc | 167 | Loading section .rodata, size 0x28 lma 0x20000bfc |
| 164 | Start address 0x20000ba4, load size 3106 | 168 | Start address 0x20000ba4, load size 3106 |
| 165 | Transfer rate: 13 KB/sec, 776 bytes/write. | 169 | Transfer rate: 13 KB/sec, 776 bytes/write. |
| 170 | ``` | ||
| 166 | 171 | ||
| 167 | then I see the LED blinking. I press CTRL+C to exit. It will show me ^C | 172 | then I see the LED blinking. I press CTRL+C to exit. It will show me ^C |
| 173 | |||
| 174 | ```console | ||
| 168 | Program received signal SIGINT, Interrupt. | 175 | Program received signal SIGINT, Interrupt. |
| 169 | 0x20000880 in embassy_executor::arch::thread::Executor::run<blink::__cortex_m_rt_main::{closure_env#0}> (self=0x200027e8, init=...) at /home/smw016108/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/embassy-executor-0.9.1/src/arch/cortex_m.rs:106 | 176 | 0x20000880 in embassy_executor::arch::thread::Executor::run<blink::__cortex_m_rt_main::{closure_env#0}> (self=0x200027e8, init=...) at /home/smw016108/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/embassy-executor-0.9.1/src/arch/cortex_m.rs:106 |
| 170 | 106 asm!("wfe"); | 177 | 106 asm!("wfe"); |
| @@ -204,8 +211,11 @@ Loading section .Reset, size 0x58 lma 0x2000244c | |||
| 204 | Loading section .rodata, size 0x6dc lma 0x200024a4 | 211 | Loading section .rodata, size 0x6dc lma 0x200024a4 |
| 205 | Start address 0x2000244c, load size 11134 | 212 | Start address 0x2000244c, load size 11134 |
| 206 | Transfer rate: 16 KB/sec, 1855 bytes/write. | 213 | Transfer rate: 16 KB/sec, 1855 bytes/write. |
| 214 | ``` | ||
| 207 | 215 | ||
| 208 | I can see in the console | 216 | I can see in the console |
| 217 | |||
| 218 | ```console | ||
| 209 | OSTIMER Alarm Example | 219 | OSTIMER Alarm Example |
| 210 | Scheduling alarm for 2 seconds... | 220 | Scheduling alarm for 2 seconds... |
| 211 | Alarm scheduled successfully | 221 | Alarm scheduled successfully |
| @@ -215,9 +225,11 @@ Alarm scheduled. Waiting 1 second then canceling... | |||
| 215 | Alarm canceled | 225 | Alarm canceled |
| 216 | Alarm was successfully canceled | 226 | Alarm was successfully canceled |
| 217 | Example complete | 227 | Example complete |
| 228 | ``` | ||
| 218 | 229 | ||
| 219 | then I press CTRL+C to stop running | 230 | then I press CTRL+C to stop running |
| 220 | 231 | ||
| 232 | ```console | ||
| 221 | ^C | 233 | ^C |
| 222 | Program received signal SIGINT, Interrupt. | 234 | Program received signal SIGINT, Interrupt. |
| 223 | 0x20000e64 in embassy_executor::arch::thread::Executor::run<ostimer_alarm::__cortex_m_rt_main::{closure_env#0}> (self=0x200027e8, init=...) at /home/smw016108/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/embassy-executor-0.9.1/src/arch/cortex_m.rs:106 | 235 | 0x20000e64 in embassy_executor::arch::thread::Executor::run<ostimer_alarm::__cortex_m_rt_main::{closure_env#0}> (self=0x200027e8, init=...) at /home/smw016108/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/embassy-executor-0.9.1/src/arch/cortex_m.rs:106 |
| @@ -225,7 +237,7 @@ Program received signal SIGINT, Interrupt. | |||
| 225 | [Inferior 1 (process 1) detached] | 237 | [Inferior 1 (process 1) detached] |
| 226 | Program loaded and started (no reset) | 238 | Program loaded and started (no reset) |
| 227 | smw016108@smw016108:~/Downloads/nxp/rust/uart/embassy-mcxa276$ | 239 | smw016108@smw016108:~/Downloads/nxp/rust/uart/embassy-mcxa276$ |
| 228 | 240 | ``` | |
| 229 | 241 | ||
| 230 | ### Windows: Running examples (RAM, no RTT/defmt) | 242 | ### Windows: Running examples (RAM, no RTT/defmt) |
| 231 | 243 | ||
| @@ -233,22 +245,27 @@ Important: On Windows, do not use `cargo run` because `.cargo/config.toml` sets | |||
| 233 | 245 | ||
| 234 | 1) Find your probe and COM port | 246 | 1) Find your probe and COM port |
| 235 | - List probes: | 247 | - List probes: |
| 236 | ```powershell | 248 | |
| 249 | ```console | ||
| 237 | probe-rs list | 250 | probe-rs list |
| 238 | ``` | 251 | ``` |
| 239 | - If multiple probes are attached, set the specific one (replace with your ID): | 252 | - If multiple probes are attached, set the specific one (replace with your ID): |
| 240 | ```powershell | 253 | |
| 254 | ```console | ||
| 241 | $env:PROBE_RS_PROBE = "1366:0101:000600110607" | 255 | $env:PROBE_RS_PROBE = "1366:0101:000600110607" |
| 242 | ``` | 256 | ``` |
| 257 | |||
| 243 | - Check Windows Device Manager → Ports (COM & LPT) for the board’s COM port. | 258 | - Check Windows Device Manager → Ports (COM & LPT) for the board’s COM port. |
| 244 | 259 | ||
| 245 | 2) Build the example | 260 | 2) Build the example |
| 246 | ```powershell | 261 | |
| 262 | ```console | ||
| 247 | cargo build --example hello --features "lpuart2" | 263 | cargo build --example hello --features "lpuart2" |
| 248 | ``` | 264 | ``` |
| 249 | 265 | ||
| 250 | 3) Run from RAM with probe-rs | 266 | 3) Run from RAM with probe-rs |
| 251 | ```powershell | 267 | |
| 268 | ```console | ||
| 252 | probe-rs run --chip MCXA276 --protocol swd --speed 1000 target/thumbv8m.main-none-eabihf/debug/examples/hello | 269 | probe-rs run --chip MCXA276 --protocol swd --speed 1000 target/thumbv8m.main-none-eabihf/debug/examples/hello |
| 253 | ``` | 270 | ``` |
| 254 | You will see a short probe-rs warning like "unknown variant, try to set watch point"; it’s harmless. | 271 | You will see a short probe-rs warning like "unknown variant, try to set watch point"; it’s harmless. |
| @@ -268,8 +285,9 @@ Notes | |||
| 268 | - If the first attempt after a reset fails to connect, just run the command again. | 285 | - If the first attempt after a reset fails to connect, just run the command again. |
| 269 | - UART2 pins: TX=P2_2, RX=P2_3 (ALT3), 115200 8N1. | 286 | - UART2 pins: TX=P2_2, RX=P2_3 (ALT3), 115200 8N1. |
| 270 | 287 | ||
| 271 | Quick commands for other examples (PowerShell) | 288 | Quick commands for other examples: |
| 272 | ```powershell | 289 | |
| 290 | ```console | ||
| 273 | # Build | 291 | # Build |
| 274 | cargo build --example blink --features "gpio ostimer0" | 292 | cargo build --example blink --features "gpio ostimer0" |
| 275 | cargo build --example lpuart_polling --features "lpuart2 ostimer0" | 293 | cargo build --example lpuart_polling --features "lpuart2 ostimer0" |
| @@ -303,7 +321,7 @@ How I tested on Windows | |||
| 303 | 321 | ||
| 304 | To build without running: | 322 | To build without running: |
| 305 | 323 | ||
| 306 | ```bash | 324 | ```console |
| 307 | cargo build --features "gpio ostimer0" --example blink | 325 | cargo build --features "gpio ostimer0" --example blink |
| 308 | cargo build --features "lpuart2 ostimer0" --example hello | 326 | cargo build --features "lpuart2 ostimer0" --example hello |
| 309 | cargo build --features "lpuart2 ostimer0" --example ostimer_alarm | 327 | cargo build --features "lpuart2 ostimer0" --example ostimer_alarm |
| @@ -311,7 +329,6 @@ cargo build --features "lpuart2 rtc0" --example rtc_alarm | |||
| 311 | # etc. | 329 | # etc. |
| 312 | ``` | 330 | ``` |
| 313 | 331 | ||
| 314 | |||
| 315 | ## Development Notes | 332 | ## Development Notes |
| 316 | 333 | ||
| 317 | ### Critical Fix: MCXA276 Interrupt Vector Table | 334 | ### Critical Fix: MCXA276 Interrupt Vector Table |
| @@ -340,7 +357,6 @@ Update (SVD 25.06.00, mcxa-pac a9dd33): No manual PAC edits are required anymore | |||
| 340 | 357 | ||
| 341 | Using `#[inline(always)]` can cause the Rust compiler to generate incorrect assembly, leading to register corruption or unexpected behavior. For example, in tight polling loops like those in the OSTIMER driver, this attribute may result in invalid instructions that zero registers (e.g., `movs r1, r0` causing r1=0), triggering hardfaults. | 358 | Using `#[inline(always)]` can cause the Rust compiler to generate incorrect assembly, leading to register corruption or unexpected behavior. For example, in tight polling loops like those in the OSTIMER driver, this attribute may result in invalid instructions that zero registers (e.g., `movs r1, r0` causing r1=0), triggering hardfaults. |
| 342 | 359 | ||
| 343 | |||
| 344 | ## License | 360 | ## License |
| 345 | 361 | ||
| 346 | This project is licensed under MIT OR Apache-2.0. \ No newline at end of file | 362 | This project is licensed under MIT OR Apache-2.0. |
diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..5357b8824 --- /dev/null +++ b/SECURITY.md | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | # Vulnerability Disclosure and Embargo Policy | ||
| 2 | |||
| 3 | The Open Device Partnership project welcomes the responsible disclosure of vulnerabilities. | ||
| 4 | |||
| 5 | ## Initial Contact | ||
| 6 | |||
| 7 | All security bugs in Open Device Partnership should be reported to the security team. | ||
| 8 | To do so, please reach out in the form of a | ||
| 9 | [Github Security Advisory](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities). | ||
| 10 | |||
| 11 | You will be invited to join this private area to discuss specifics. Doing so | ||
| 12 | allows us to start with a high level of confidentiality and relax it if the | ||
| 13 | issue is less critical, moving to work on the fix in the open. | ||
| 14 | |||
| 15 | Your initial contact will be acknowledged within 48 hours, and you’ll receive | ||
| 16 | a more detailed response within 96 hours indicating the next steps in handling | ||
| 17 | your report. | ||
| 18 | |||
| 19 | After the initial reply to your report, the security team will endeavor to | ||
| 20 | keep you informed of the progress being made towards a fix and full | ||
| 21 | announcement. As recommended by | ||
| 22 | [RFPolicy](https://dl.packetstormsecurity.net/papers/general/rfpolicy-2.0.txt), | ||
| 23 | these updates will be sent at least every five working days. | ||
| 24 | |||
| 25 | ## Disclosure Policy | ||
| 26 | |||
| 27 | The Open Device Partnership project has a 5 step disclosure process. | ||
| 28 | |||
| 29 | 1. Contact is established, a private channel created, and the security report | ||
| 30 | is received and is assigned a primary handler. This person will coordinate | ||
| 31 | the fix and release process. | ||
| 32 | 2. The problem is confirmed and a list of all affected versions is determined. | ||
| 33 | If an embargo is needed (see below), details of the embargo are decided. | ||
| 34 | 3. Code is audited to find any potential similar problems. | ||
| 35 | 4. Fixes are prepared for all releases which are still under maintenance. In | ||
| 36 | case of embargo, these fixes are not committed to the public repository but | ||
| 37 | rather held in a private fork pending the announcement. | ||
| 38 | 5. The changes are pushed to the public repository and new builds are deployed. | ||
| 39 | |||
| 40 | This process can take some time, especially when coordination is required | ||
| 41 | with maintainers of other projects. Every effort will be made to handle the bug | ||
| 42 | in as timely a manner as possible, however it is important that we follow the | ||
| 43 | release process above to ensure that the disclosure is handled in a consistent | ||
| 44 | manner. | ||
| 45 | |||
| 46 | ## Embargoes | ||
| 47 | |||
| 48 | While the Open Device Partnership project aims to follow the highest standards of | ||
| 49 | transparency and openness, handling some security issues may pose such an | ||
| 50 | immediate threat to various stakeholders and require coordination between | ||
| 51 | various actors that it cannot be made immediately public. | ||
| 52 | |||
| 53 | In this case, security issues will fall under an embargo. | ||
| 54 | |||
| 55 | An embargo can be called for in various cases: | ||
| 56 | |||
| 57 | - when disclosing the issue without simultaneously providing a mitigation | ||
| 58 | would seriously endanger users, | ||
| 59 | - when producing a fix requires coordinating between multiple actors (such as | ||
| 60 | upstream or downstream/dependency projects), or simply | ||
| 61 | - when proper analysis of the issue and its ramifications demands time. | ||
| 62 | |||
| 63 | If we determine that an issue you report requires an embargo, we will discuss | ||
| 64 | this with you and try to find a reasonable expiry date (aka “embargo | ||
| 65 | completion date”), as well as who should be included in the list of | ||
| 66 | need-to-know people. | ||
diff --git a/deny.toml b/deny.toml new file mode 100644 index 000000000..7097f2f55 --- /dev/null +++ b/deny.toml | |||
| @@ -0,0 +1,241 @@ | |||
| 1 | # This template contains all of the possible sections and their default values | ||
| 2 | |||
| 3 | # Note that all fields that take a lint level have these possible values: | ||
| 4 | # * deny - An error will be produced and the check will fail | ||
| 5 | # * warn - A warning will be produced, but the check will not fail | ||
| 6 | # * allow - No warning or error will be produced, though in some cases a note | ||
| 7 | # will be | ||
| 8 | |||
| 9 | # The values provided in this template are the default values that will be used | ||
| 10 | # when any section or field is not specified in your own configuration | ||
| 11 | |||
| 12 | # Root options | ||
| 13 | |||
| 14 | # The graph table configures how the dependency graph is constructed and thus | ||
| 15 | # which crates the checks are performed against | ||
| 16 | [graph] | ||
| 17 | # If 1 or more target triples (and optionally, target_features) are specified, | ||
| 18 | # only the specified targets will be checked when running `cargo deny check`. | ||
| 19 | # This means, if a particular package is only ever used as a target specific | ||
| 20 | # dependency, such as, for example, the `nix` crate only being used via the | ||
| 21 | # `target_family = "unix"` configuration, that only having windows targets in | ||
| 22 | # this list would mean the nix crate, as well as any of its exclusive | ||
| 23 | # dependencies not shared by any other crates, would be ignored, as the target | ||
| 24 | # list here is effectively saying which targets you are building for. | ||
| 25 | targets = [ | ||
| 26 | # The triple can be any string, but only the target triples built in to | ||
| 27 | # rustc (as of 1.40) can be checked against actual config expressions | ||
| 28 | #"x86_64-unknown-linux-musl", | ||
| 29 | # You can also specify which target_features you promise are enabled for a | ||
| 30 | # particular target. target_features are currently not validated against | ||
| 31 | # the actual valid features supported by the target architecture. | ||
| 32 | #{ triple = "wasm32-unknown-unknown", features = ["atomics"] }, | ||
| 33 | ] | ||
| 34 | # When creating the dependency graph used as the source of truth when checks are | ||
| 35 | # executed, this field can be used to prune crates from the graph, removing them | ||
| 36 | # from the view of cargo-deny. This is an extremely heavy hammer, as if a crate | ||
| 37 | # is pruned from the graph, all of its dependencies will also be pruned unless | ||
| 38 | # they are connected to another crate in the graph that hasn't been pruned, | ||
| 39 | # so it should be used with care. The identifiers are [Package ID Specifications] | ||
| 40 | # (https://doc.rust-lang.org/cargo/reference/pkgid-spec.html) | ||
| 41 | #exclude = [] | ||
| 42 | # If true, metadata will be collected with `--all-features`. Note that this can't | ||
| 43 | # be toggled off if true, if you want to conditionally enable `--all-features` it | ||
| 44 | # is recommended to pass `--all-features` on the cmd line instead | ||
| 45 | all-features = false | ||
| 46 | # If true, metadata will be collected with `--no-default-features`. The same | ||
| 47 | # caveat with `all-features` applies | ||
| 48 | no-default-features = false | ||
| 49 | # If set, these feature will be enabled when collecting metadata. If `--features` | ||
| 50 | # is specified on the cmd line they will take precedence over this option. | ||
| 51 | #features = [] | ||
| 52 | |||
| 53 | # The output table provides options for how/if diagnostics are outputted | ||
| 54 | [output] | ||
| 55 | # When outputting inclusion graphs in diagnostics that include features, this | ||
| 56 | # option can be used to specify the depth at which feature edges will be added. | ||
| 57 | # This option is included since the graphs can be quite large and the addition | ||
| 58 | # of features from the crate(s) to all of the graph roots can be far too verbose. | ||
| 59 | # This option can be overridden via `--feature-depth` on the cmd line | ||
| 60 | feature-depth = 1 | ||
| 61 | |||
| 62 | # This section is considered when running `cargo deny check advisories` | ||
| 63 | # More documentation for the advisories section can be found here: | ||
| 64 | # https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html | ||
| 65 | [advisories] | ||
| 66 | # The path where the advisory databases are cloned/fetched into | ||
| 67 | #db-path = "$CARGO_HOME/advisory-dbs" | ||
| 68 | # The url(s) of the advisory databases to use | ||
| 69 | #db-urls = ["https://github.com/rustsec/advisory-db"] | ||
| 70 | # A list of advisory IDs to ignore. Note that ignored advisories will still | ||
| 71 | # output a note when they are encountered. | ||
| 72 | ignore = [ | ||
| 73 | #"RUSTSEC-0000-0000", | ||
| 74 | #{ id = "RUSTSEC-0000-0000", reason = "you can specify a reason the advisory is ignored" }, | ||
| 75 | #"[email protected]", # you can also ignore yanked crate versions if you wish | ||
| 76 | #{ crate = "[email protected]", reason = "you can specify why you are ignoring the yanked crate" }, | ||
| 77 | # { id = "RUSTSEC-2024-0370", reason = "proc-macro-error is unmaintained, no safe upgrade available, need upstream dependencies to migrate away from it." }, | ||
| 78 | { id = "RUSTSEC-2024-0436", reason = "there are no suitable replacements for paste right now; paste has been archived as read-only. It only affects compile time concatenation in macros. We will allow it for now" }, | ||
| 79 | # { id = "RUSTSEC-2023-0089", reason = "this is a deprecation warning for a dependency of a dependency. https://github.com/jamesmunns/postcard/issues/223 tracks fixing the dependency; until that's resolved, we can accept the deprecated code as it has no known vulnerabilities."} | ||
| 80 | ] | ||
| 81 | # If this is true, then cargo deny will use the git executable to fetch advisory database. | ||
| 82 | # If this is false, then it uses a built-in git library. | ||
| 83 | # Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support. | ||
| 84 | # See Git Authentication for more information about setting up git authentication. | ||
| 85 | #git-fetch-with-cli = true | ||
| 86 | |||
| 87 | # This section is considered when running `cargo deny check licenses` | ||
| 88 | # More documentation for the licenses section can be found here: | ||
| 89 | # https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html | ||
| 90 | [licenses] | ||
| 91 | # List of explicitly allowed licenses | ||
| 92 | # See https://spdx.org/licenses/ for list of possible licenses | ||
| 93 | # [possible values: any SPDX 3.11 short identifier (+ optional exception)]. | ||
| 94 | allow = [ | ||
| 95 | "MIT", | ||
| 96 | "Apache-2.0", | ||
| 97 | |||
| 98 | # unicode-ident 1.0.14 switched from Unicode-DFS-2016 to Unicode-3.0 license. | ||
| 99 | "Unicode-3.0", | ||
| 100 | #"Apache-2.0 WITH LLVM-exception", | ||
| 101 | ] | ||
| 102 | # The confidence threshold for detecting a license from license text. | ||
| 103 | # The higher the value, the more closely the license text must be to the | ||
| 104 | # canonical license text of a valid SPDX license file. | ||
| 105 | # [possible values: any between 0.0 and 1.0]. | ||
| 106 | confidence-threshold = 0.8 | ||
| 107 | # Allow 1 or more licenses on a per-crate basis, so that particular licenses | ||
| 108 | # aren't accepted for every possible crate as with the normal allow list | ||
| 109 | exceptions = [ | ||
| 110 | # Each entry is the crate and version constraint, and its specific allow | ||
| 111 | # list | ||
| 112 | #{ allow = ["Zlib"], crate = "adler32" }, | ||
| 113 | ] | ||
| 114 | |||
| 115 | # Some crates don't have (easily) machine readable licensing information, | ||
| 116 | # adding a clarification entry for it allows you to manually specify the | ||
| 117 | # licensing information | ||
| 118 | #[[licenses.clarify]] | ||
| 119 | # The package spec the clarification applies to | ||
| 120 | #crate = "ring" | ||
| 121 | # The SPDX expression for the license requirements of the crate | ||
| 122 | #expression = "MIT AND ISC AND OpenSSL" | ||
| 123 | # One or more files in the crate's source used as the "source of truth" for | ||
| 124 | # the license expression. If the contents match, the clarification will be used | ||
| 125 | # when running the license check, otherwise the clarification will be ignored | ||
| 126 | # and the crate will be checked normally, which may produce warnings or errors | ||
| 127 | # depending on the rest of your configuration | ||
| 128 | #license-files = [ | ||
| 129 | # Each entry is a crate relative path, and the (opaque) hash of its contents | ||
| 130 | #{ path = "LICENSE", hash = 0xbd0eed23 } | ||
| 131 | #] | ||
| 132 | |||
| 133 | [licenses.private] | ||
| 134 | # If true, ignores workspace crates that aren't published, or are only | ||
| 135 | # published to private registries. | ||
| 136 | # To see how to mark a crate as unpublished (to the official registry), | ||
| 137 | # visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field. | ||
| 138 | ignore = false | ||
| 139 | # One or more private registries that you might publish crates to, if a crate | ||
| 140 | # is only published to private registries, and ignore is true, the crate will | ||
| 141 | # not have its license(s) checked | ||
| 142 | registries = [ | ||
| 143 | #"https://sekretz.com/registry | ||
| 144 | ] | ||
| 145 | |||
| 146 | # This section is considered when running `cargo deny check bans`. | ||
| 147 | # More documentation about the 'bans' section can be found here: | ||
| 148 | # https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html | ||
| 149 | [bans] | ||
| 150 | # Lint level for when multiple versions of the same crate are detected | ||
| 151 | multiple-versions = "warn" | ||
| 152 | # Lint level for when a crate version requirement is `*` | ||
| 153 | wildcards = "allow" | ||
| 154 | # The graph highlighting used when creating dotgraphs for crates | ||
| 155 | # with multiple versions | ||
| 156 | # * lowest-version - The path to the lowest versioned duplicate is highlighted | ||
| 157 | # * simplest-path - The path to the version with the fewest edges is highlighted | ||
| 158 | # * all - Both lowest-version and simplest-path are used | ||
| 159 | highlight = "all" | ||
| 160 | # The default lint level for `default` features for crates that are members of | ||
| 161 | # the workspace that is being checked. This can be overridden by allowing/denying | ||
| 162 | # `default` on a crate-by-crate basis if desired. | ||
| 163 | workspace-default-features = "allow" | ||
| 164 | # The default lint level for `default` features for external crates that are not | ||
| 165 | # members of the workspace. This can be overridden by allowing/denying `default` | ||
| 166 | # on a crate-by-crate basis if desired. | ||
| 167 | external-default-features = "allow" | ||
| 168 | # List of crates that are allowed. Use with care! | ||
| 169 | allow = [ | ||
| 170 | #"[email protected]", | ||
| 171 | #{ crate = "[email protected]", reason = "you can specify a reason it is allowed" }, | ||
| 172 | ] | ||
| 173 | # List of crates to deny | ||
| 174 | deny = [ | ||
| 175 | #"[email protected]", | ||
| 176 | #{ crate = "[email protected]", reason = "you can specify a reason it is banned" }, | ||
| 177 | # Wrapper crates can optionally be specified to allow the crate when it | ||
| 178 | # is a direct dependency of the otherwise banned crate | ||
| 179 | #{ crate = "[email protected]", wrappers = ["this-crate-directly-depends-on-ansi_term"] }, | ||
| 180 | ] | ||
| 181 | |||
| 182 | # List of features to allow/deny | ||
| 183 | # Each entry the name of a crate and a version range. If version is | ||
| 184 | # not specified, all versions will be matched. | ||
| 185 | #[[bans.features]] | ||
| 186 | #crate = "reqwest" | ||
| 187 | # Features to not allow | ||
| 188 | #deny = ["json"] | ||
| 189 | # Features to allow | ||
| 190 | #allow = [ | ||
| 191 | # "rustls", | ||
| 192 | # "__rustls", | ||
| 193 | # "__tls", | ||
| 194 | # "hyper-rustls", | ||
| 195 | # "rustls", | ||
| 196 | # "rustls-pemfile", | ||
| 197 | # "rustls-tls-webpki-roots", | ||
| 198 | # "tokio-rustls", | ||
| 199 | # "webpki-roots", | ||
| 200 | #] | ||
| 201 | # If true, the allowed features must exactly match the enabled feature set. If | ||
| 202 | # this is set there is no point setting `deny` | ||
| 203 | #exact = true | ||
| 204 | |||
| 205 | # Certain crates/versions that will be skipped when doing duplicate detection. | ||
| 206 | skip = [ | ||
| 207 | #"[email protected]", | ||
| 208 | #{ crate = "[email protected]", reason = "you can specify a reason why it can't be updated/removed" }, | ||
| 209 | ] | ||
| 210 | # Similarly to `skip` allows you to skip certain crates during duplicate | ||
| 211 | # detection. Unlike skip, it also includes the entire tree of transitive | ||
| 212 | # dependencies starting at the specified crate, up to a certain depth, which is | ||
| 213 | # by default infinite. | ||
| 214 | skip-tree = [ | ||
| 215 | #"[email protected]", # will be skipped along with _all_ of its direct and transitive dependencies | ||
| 216 | #{ crate = "[email protected]", depth = 20 }, | ||
| 217 | ] | ||
| 218 | |||
| 219 | # This section is considered when running `cargo deny check sources`. | ||
| 220 | # More documentation about the 'sources' section can be found here: | ||
| 221 | # https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html | ||
| 222 | [sources] | ||
| 223 | # Lint level for what to happen when a crate from a crate registry that is not | ||
| 224 | # in the allow list is encountered | ||
| 225 | unknown-registry = "warn" | ||
| 226 | # Lint level for what to happen when a crate from a git repository that is not | ||
| 227 | # in the allow list is encountered | ||
| 228 | unknown-git = "warn" | ||
| 229 | # List of URLs for allowed crate registries. Defaults to the crates.io index | ||
| 230 | # if not specified. If it is specified but empty, no registries are allowed. | ||
| 231 | allow-registry = ["https://github.com/rust-lang/crates.io-index"] | ||
| 232 | # List of URLs for allowed Git repositories | ||
| 233 | allow-git = [] | ||
| 234 | |||
| 235 | [sources.allow-org] | ||
| 236 | # github.com organizations to allow git sources for | ||
| 237 | github = ["OpenDevicePartnership"] | ||
| 238 | # gitlab.com organizations to allow git sources for | ||
| 239 | gitlab = [] | ||
| 240 | # bitbucket.org organizations to allow git sources for | ||
| 241 | bitbucket = [] | ||
diff --git a/supply-chain/README.md b/supply-chain/README.md new file mode 100644 index 000000000..12f8777b0 --- /dev/null +++ b/supply-chain/README.md | |||
| @@ -0,0 +1,149 @@ | |||
| 1 | # Working with cargo vet | ||
| 2 | |||
| 3 | ## Introduction | ||
| 4 | |||
| 5 | `cargo vet` is a tool to help ensure that third-party Rust dependencies have been audited by a trusted entity. | ||
| 6 | It matches all dependencies against a set of audits conducted by the authors of the project or entities they trust. | ||
| 7 | To learn more, visit [mozilla/cargo-vet](https://github.com/mozilla/cargo-vet) | ||
| 8 | |||
| 9 | --- | ||
| 10 | |||
| 11 | ## Adding a new dependency | ||
| 12 | |||
| 13 | When updating or adding a new dependency, we need to ensure it's audited before being merged into main. | ||
| 14 | For our repositories, we have designated experts who are responsible for vetting any new dependencies being added to their repository. | ||
| 15 | _It is the shared responsibility of the developer creating the PR and the auditors to conduct a successful audit._ | ||
| 16 | Follow the process below to ensure compliance: | ||
| 17 | |||
| 18 | ### For Developers | ||
| 19 | 1. **Respond to `cargo vet` failures**: | ||
| 20 | - If your PR fails the `cargo vet` step, the cargo-vet workflow will add a comment to the PR with a template questionnaire | ||
| 21 | - Copy the questionnaire, fill it out and paste it as a new comment on the PR. This greatly helps the auditors get some context of the changes requiring the new dependencies | ||
| 22 | |||
| 23 | 2. **Engage with auditors**: | ||
| 24 | - Respond to any questions that the auditors might have regarding the need of any new dependencies | ||
| 25 | |||
| 26 | 3. **Rebase and verify**: | ||
| 27 | - At their discretion, auditors will check in their audits into either [rust-crate-audits](https://github.com/OpenDevicePartnership/rust-crate-audits) or into the same repository | ||
| 28 | - Once the new audits have been merged, rebase your branch on main and verify it passes `cargo vet` | ||
| 29 | ```bash | ||
| 30 | git fetch upstream | ||
| 31 | git rebase upstream/main | ||
| 32 | cargo vet | ||
| 33 | ``` | ||
| 34 | |||
| 35 | 4. **Update PR**: | ||
| 36 | - If the audits were checked into rust-crate-audits, they will show up in _imports.lock_ on running `cargo vet`. In this case add the updated _imports.lock_ to your PR | ||
| 37 | - If the audits were checked into the same repository, they will be present in _audits.toml_ after rebase and you can simply force push to your PR after rebase | ||
| 38 | ```bash | ||
| 39 | git push -f | ||
| 40 | ``` | ||
| 41 | |||
| 42 | 5. **Check PR status**: | ||
| 43 | - The existing PR comment from the previous failure will be updated with a success message once the check passes | ||
| 44 | |||
| 45 | ### For Auditors | ||
| 46 | |||
| 47 | 1. **Review the questionnaire**: | ||
| 48 | - Check the filled questionnaire on the PR once the developer responds to the `cargo vet` failure | ||
| 49 | - Respond to the developer comment in case more information is needed | ||
| 50 | |||
| 51 | 2. **Audit new dependencies**: | ||
| 52 | - Inspect the `cargo vet` failures using your preferred method | ||
| 53 | - Use [gh pr checkout](https://cli.github.com/manual/gh_pr_checkout) to checkout the PR and run `cargo vet --locked` | ||
| 54 | - Use [Github Pull Requests for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) to checkout the PR and run `cargo vet --locked` | ||
| 55 | - For more suggestions: [Checking out pull requests locally](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally) | ||
| 56 | |||
| 57 | 3. **Follow `cargo vet` recommendations**: | ||
| 58 | - Follow the recommendations of the `cargo vet` command output, either `cargo vet diff` for version update or `cargo vet inspect` for new dependencies | ||
| 59 | |||
| 60 | 4. **Record audits**: | ||
| 61 | - Use `cargo vet certify` to add new audits to _audits.toml_ | ||
| 62 | - Verify all dependencies pass using `cargo vet` | ||
| 63 | |||
| 64 | 5. **Decide audit location**: | ||
| 65 | - **Shared audits**: New audits should ideally be shared across ODP repositories to reduce the overhead of multiple audits for the same dependencies. To facilitate this, it's recommended to cut and paste the new audits and submit as a separate PR to the _audits.toml_ in [rust-crate-audits](https://github.com/OpenDevicePartnership/rust-crate-audits) | ||
| 66 | - If due to business reasons, the audits are not to be shared across repositories, copy the updated _audits.toml_ to a new branch off main in the same repository and submit the PR to update the audits | ||
| 67 | |||
| 68 | 6. **Communicate successful audit**: | ||
| 69 | - Communicate to the PR developer via a PR comment so they can update the PR and get `cargo vet` to pass | ||
| 70 | |||
| 71 | --- | ||
| 72 | |||
| 73 | ## Audit criteria | ||
| 74 | `cargo vet` comes pre-equipped with two built-in criteria but supports adding new criteria to suit our needs. | ||
| 75 | As defined [here](https://mozilla.github.io/cargo-vet/built-in-criteria.html), the default criteria are: | ||
| 76 | |||
| 77 | - **safe-to-run** | ||
| 78 | This crate can be compiled, run, and tested on a local workstation or in | ||
| 79 | controlled automation without surprising consequences, such as: | ||
| 80 | * Reading or writing data from sensitive or unrelated parts of the filesystem. | ||
| 81 | * Installing software or reconfiguring the device. | ||
| 82 | * Connecting to untrusted network endpoints. | ||
| 83 | * Misuse of system resources (e.g. cryptocurrency mining). | ||
| 84 | |||
| 85 | - **safe-to-deploy** | ||
| 86 | This crate will not introduce a serious security vulnerability to production | ||
| 87 | software exposed to untrusted input. | ||
| 88 | |||
| 89 | Auditors are not required to perform a full logic review of the entire crate. | ||
| 90 | Rather, they must review enough to fully reason about the behavior of all unsafe | ||
| 91 | blocks and usage of powerful imports. For any reasonable usage of the crate in | ||
| 92 | real-world software, an attacker must not be able to manipulate the runtime | ||
| 93 | behavior of these sections in an exploitable or surprising way. | ||
| 94 | |||
| 95 | Ideally, all unsafe code is fully sound, and ambient capabilities (e.g. | ||
| 96 | filesystem access) are hardened against manipulation and consistent with the | ||
| 97 | advertised behavior of the crate. However, some discretion is permitted. In such | ||
| 98 | cases, the nature of the discretion should be recorded in the `notes` field of | ||
| 99 | the audit record. | ||
| 100 | |||
| 101 | For crates which generate deployed code (e.g. build dependencies or procedural | ||
| 102 | macros), reasonable usage of the crate should output code which meets the above | ||
| 103 | criteria. | ||
| 104 | |||
| 105 | **Note: `safe-to-deploy` implies `safe-to-run`** | ||
| 106 | |||
| 107 | --- | ||
| 108 | |||
| 109 | ## Conducting an audit | ||
| 110 | |||
| 111 | When performing an audit for a new or updated dependency, auditors may consider the following criteria to ensure the safety, reliability, and suitability of the crate for use in our projects: | ||
| 112 | |||
| 113 | - **Security**: | ||
| 114 | - Review the crate for known vulnerabilities or security advisories. | ||
| 115 | - Check for unsafe code usage and ensure it is justified and well-documented. | ||
| 116 | - Evaluate the crate’s history of security issues and responsiveness to reported problems. | ||
| 117 | |||
| 118 | - **Maintenance and Activity**: | ||
| 119 | - Assess the frequency of updates and the responsiveness of maintainers to issues and pull requests. | ||
| 120 | - Prefer crates that are actively maintained and have a healthy contributor base. | ||
| 121 | |||
| 122 | - **License Compliance**: | ||
| 123 | - Verify that the crate’s license is compatible with our project’s licensing requirements. | ||
| 124 | |||
| 125 | - **Community Trust and Adoption**: | ||
| 126 | - Consider the crate’s adoption in the wider Rust ecosystem. | ||
| 127 | - Prefer crates that are widely used and trusted by the community. | ||
| 128 | |||
| 129 | - **Functionality and Suitability**: | ||
| 130 | - Confirm that the crate provides the required functionality without unnecessary features or bloat. | ||
| 131 | - Evaluate whether the crate’s API is stable and unlikely to introduce breaking changes unexpectedly. | ||
| 132 | |||
| 133 | - **Audit Trail**: | ||
| 134 | - Record the audit decision, including any concerns, mitigations, or recommendations for future updates. | ||
| 135 | - If exemptions are granted, document the justification and any follow-up actions required. | ||
| 136 | |||
| 137 | --- | ||
| 138 | |||
| 139 | ## Tips for using `cargo vet`: | ||
| 140 | |||
| 141 | - **Update _imports.lock_**: | ||
| 142 | - Import trusted third party audits to reduce the number of new audits to be performed. Running `cargo vet` without `--locked` fetches new imports and updates _imports.lock_ with any audits that are helpful for our project. | ||
| 143 | |||
| 144 | - **Add exemptions**: | ||
| 145 | - If an audit cannot be performed for some dependency due to time sensitivity or business justified reasons, use `cargo vet add-exemption <PACKAGE> <VERSION>` to add the dependency to exemptions in _config.toml_ | ||
| 146 | - To add all remaining audits to exemptions at once, use `cargo vet regenerate exemptions` | ||
| 147 | |||
| 148 | - **Prune unnecessary entries**: | ||
| 149 | - Remove unnecessary exemptions and imports using `cargo vet prune` \ No newline at end of file | ||
diff --git a/supply-chain/audits.toml b/supply-chain/audits.toml new file mode 100644 index 000000000..1c3d54760 --- /dev/null +++ b/supply-chain/audits.toml | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | |||
| 2 | # cargo-vet audits file | ||
| 3 | |||
| 4 | [[audits.autocfg]] | ||
| 5 | who = "Felipe Balbi <[email protected]>" | ||
| 6 | criteria = "safe-to-deploy" | ||
| 7 | version = "1.5.0" | ||
| 8 | |||
| 9 | [[audits.darling_core]] | ||
| 10 | who = "Felipe Balbi <[email protected]>" | ||
| 11 | criteria = "safe-to-deploy" | ||
| 12 | version = "0.20.11" | ||
| 13 | |||
| 14 | [[audits.defmt-rtt]] | ||
| 15 | who = "Felipe Balbi <[email protected]>" | ||
| 16 | criteria = "safe-to-deploy" | ||
| 17 | version = "1.0.0" | ||
| 18 | notes = "defmt-rtt is used for all our logging purposes. Version 1.0.0 merely stabilizes what was already available previously." | ||
| 19 | |||
| 20 | [[audits.embassy-executor-timer-queue]] | ||
| 21 | who = "Felipe Balbi <[email protected]>" | ||
| 22 | criteria = "safe-to-deploy" | ||
| 23 | version = "0.1.0" | ||
| 24 | |||
| 25 | [[audits.embassy-executor-timer-queue]] | ||
| 26 | who = "Felipe Balbi <[email protected]>" | ||
| 27 | criteria = "safe-to-deploy" | ||
| 28 | version = "0.1.0" | ||
| 29 | |||
| 30 | [[audits.embassy-time-queue-utils]] | ||
| 31 | who = "Felipe Balbi <[email protected]>" | ||
| 32 | criteria = "safe-to-deploy" | ||
| 33 | version = "0.3.0" | ||
| 34 | |||
| 35 | [[audits.static_cell]] | ||
| 36 | who = "jerrysxie <[email protected]>" | ||
| 37 | criteria = "safe-to-run" | ||
| 38 | delta = "2.1.0 -> 2.1.1" | ||
diff --git a/supply-chain/config.toml b/supply-chain/config.toml new file mode 100644 index 000000000..501bd91d7 --- /dev/null +++ b/supply-chain/config.toml | |||
| @@ -0,0 +1,226 @@ | |||
| 1 | |||
| 2 | # cargo-vet config file | ||
| 3 | |||
| 4 | [cargo-vet] | ||
| 5 | version = "0.10" | ||
| 6 | |||
| 7 | [imports.OpenDevicePartnership] | ||
| 8 | url = "https://raw.githubusercontent.com/OpenDevicePartnership/rust-crate-audits/main/audits.toml" | ||
| 9 | |||
| 10 | [imports.google] | ||
| 11 | url = "https://raw.githubusercontent.com/google/rust-crate-audits/main/audits.toml" | ||
| 12 | |||
| 13 | [imports.mozilla] | ||
| 14 | url = "https://raw.githubusercontent.com/mozilla/supply-chain/main/audits.toml" | ||
| 15 | |||
| 16 | [[exemptions.az]] | ||
| 17 | version = "1.2.1" | ||
| 18 | criteria = "safe-to-deploy" | ||
| 19 | |||
| 20 | [[exemptions.bare-metal]] | ||
| 21 | version = "0.2.5" | ||
| 22 | criteria = "safe-to-deploy" | ||
| 23 | |||
| 24 | [[exemptions.bitfield]] | ||
| 25 | version = "0.13.2" | ||
| 26 | criteria = "safe-to-deploy" | ||
| 27 | |||
| 28 | [[exemptions.bitfield]] | ||
| 29 | version = "0.15.0" | ||
| 30 | criteria = "safe-to-deploy" | ||
| 31 | |||
| 32 | [[exemptions.chrono]] | ||
| 33 | version = "0.4.40" | ||
| 34 | criteria = "safe-to-deploy" | ||
| 35 | |||
| 36 | [[exemptions.cortex-m]] | ||
| 37 | version = "0.7.7" | ||
| 38 | criteria = "safe-to-deploy" | ||
| 39 | |||
| 40 | [[exemptions.cortex-m-rt]] | ||
| 41 | version = "0.7.5" | ||
| 42 | criteria = "safe-to-deploy" | ||
| 43 | |||
| 44 | [[exemptions.cortex-m-rt-macros]] | ||
| 45 | version = "0.7.5" | ||
| 46 | criteria = "safe-to-deploy" | ||
| 47 | |||
| 48 | [[exemptions.critical-section]] | ||
| 49 | version = "1.2.0" | ||
| 50 | criteria = "safe-to-deploy" | ||
| 51 | |||
| 52 | [[exemptions.darling]] | ||
| 53 | version = "0.20.11" | ||
| 54 | criteria = "safe-to-run" | ||
| 55 | |||
| 56 | [[exemptions.darling_macro]] | ||
| 57 | version = "0.20.11" | ||
| 58 | criteria = "safe-to-run" | ||
| 59 | |||
| 60 | [[exemptions.defmt]] | ||
| 61 | version = "1.0.1" | ||
| 62 | criteria = "safe-to-deploy" | ||
| 63 | |||
| 64 | [[exemptions.defmt-macros]] | ||
| 65 | version = "1.0.1" | ||
| 66 | criteria = "safe-to-deploy" | ||
| 67 | |||
| 68 | [[exemptions.defmt-parser]] | ||
| 69 | version = "1.0.0" | ||
| 70 | criteria = "safe-to-deploy" | ||
| 71 | |||
| 72 | [[exemptions.embassy-embedded-hal]] | ||
| 73 | version = "0.5.0" | ||
| 74 | criteria = "safe-to-deploy" | ||
| 75 | |||
| 76 | [[exemptions.embassy-executor]] | ||
| 77 | version = "0.9.0" | ||
| 78 | criteria = "safe-to-run" | ||
| 79 | |||
| 80 | [[exemptions.embassy-executor-macros]] | ||
| 81 | version = "0.7.0" | ||
| 82 | criteria = "safe-to-run" | ||
| 83 | |||
| 84 | [[exemptions.embassy-futures]] | ||
| 85 | version = "0.1.2" | ||
| 86 | criteria = "safe-to-deploy" | ||
| 87 | |||
| 88 | [[exemptions.embassy-hal-internal]] | ||
| 89 | version = "0.3.0" | ||
| 90 | criteria = "safe-to-deploy" | ||
| 91 | |||
| 92 | [[exemptions.embassy-sync]] | ||
| 93 | version = "0.7.2" | ||
| 94 | criteria = "safe-to-deploy" | ||
| 95 | |||
| 96 | [[exemptions.embassy-time]] | ||
| 97 | version = "0.5.0" | ||
| 98 | criteria = "safe-to-deploy" | ||
| 99 | |||
| 100 | [[exemptions.embassy-time-driver]] | ||
| 101 | version = "0.2.1" | ||
| 102 | criteria = "safe-to-deploy" | ||
| 103 | |||
| 104 | [[exemptions.embedded-hal]] | ||
| 105 | version = "0.2.7" | ||
| 106 | criteria = "safe-to-deploy" | ||
| 107 | |||
| 108 | [[exemptions.embedded-hal]] | ||
| 109 | version = "1.0.0" | ||
| 110 | criteria = "safe-to-deploy" | ||
| 111 | |||
| 112 | [[exemptions.embedded-hal-async]] | ||
| 113 | version = "1.0.0" | ||
| 114 | criteria = "safe-to-deploy" | ||
| 115 | |||
| 116 | [[exemptions.embedded-hal-nb]] | ||
| 117 | version = "1.0.0" | ||
| 118 | criteria = "safe-to-deploy" | ||
| 119 | |||
| 120 | [[exemptions.embedded-io]] | ||
| 121 | version = "0.6.1" | ||
| 122 | criteria = "safe-to-deploy" | ||
| 123 | |||
| 124 | [[exemptions.embedded-io-async]] | ||
| 125 | version = "0.6.1" | ||
| 126 | criteria = "safe-to-deploy" | ||
| 127 | |||
| 128 | [[exemptions.embedded-storage]] | ||
| 129 | version = "0.3.1" | ||
| 130 | criteria = "safe-to-deploy" | ||
| 131 | |||
| 132 | [[exemptions.embedded-storage-async]] | ||
| 133 | version = "0.4.1" | ||
| 134 | criteria = "safe-to-deploy" | ||
| 135 | |||
| 136 | [[exemptions.fixed]] | ||
| 137 | version = "1.29.0" | ||
| 138 | criteria = "safe-to-deploy" | ||
| 139 | |||
| 140 | [[exemptions.futures-core]] | ||
| 141 | version = "0.3.31" | ||
| 142 | criteria = "safe-to-deploy" | ||
| 143 | |||
| 144 | [[exemptions.futures-sink]] | ||
| 145 | version = "0.3.31" | ||
| 146 | criteria = "safe-to-deploy" | ||
| 147 | |||
| 148 | [[exemptions.hash32]] | ||
| 149 | version = "0.3.1" | ||
| 150 | criteria = "safe-to-deploy" | ||
| 151 | |||
| 152 | [[exemptions.heapless]] | ||
| 153 | version = "0.8.0" | ||
| 154 | criteria = "safe-to-deploy" | ||
| 155 | |||
| 156 | [[exemptions.ident_case]] | ||
| 157 | version = "1.0.1" | ||
| 158 | criteria = "safe-to-run" | ||
| 159 | |||
| 160 | [[exemptions.itertools]] | ||
| 161 | version = "0.11.0" | ||
| 162 | criteria = "safe-to-deploy" | ||
| 163 | |||
| 164 | [[exemptions.log]] | ||
| 165 | version = "0.4.27" | ||
| 166 | criteria = "safe-to-deploy" | ||
| 167 | |||
| 168 | [[exemptions.mimxrt600-fcb]] | ||
| 169 | version = "0.2.1" | ||
| 170 | criteria = "safe-to-deploy" | ||
| 171 | |||
| 172 | [[exemptions.paste]] | ||
| 173 | version = "1.0.15" | ||
| 174 | criteria = "safe-to-deploy" | ||
| 175 | |||
| 176 | [[exemptions.portable-atomic]] | ||
| 177 | version = "1.11.0" | ||
| 178 | criteria = "safe-to-run" | ||
| 179 | |||
| 180 | [[exemptions.proc-macro-error-attr2]] | ||
| 181 | version = "2.0.0" | ||
| 182 | criteria = "safe-to-deploy" | ||
| 183 | |||
| 184 | [[exemptions.proc-macro-error2]] | ||
| 185 | version = "2.0.1" | ||
| 186 | criteria = "safe-to-deploy" | ||
| 187 | |||
| 188 | [[exemptions.rustc_version]] | ||
| 189 | version = "0.2.3" | ||
| 190 | criteria = "safe-to-deploy" | ||
| 191 | |||
| 192 | [[exemptions.semver]] | ||
| 193 | version = "0.9.0" | ||
| 194 | criteria = "safe-to-deploy" | ||
| 195 | |||
| 196 | [[exemptions.semver-parser]] | ||
| 197 | version = "0.7.0" | ||
| 198 | criteria = "safe-to-deploy" | ||
| 199 | |||
| 200 | [[exemptions.static_cell]] | ||
| 201 | version = "2.1.0" | ||
| 202 | criteria = "safe-to-run" | ||
| 203 | |||
| 204 | [[exemptions.syn]] | ||
| 205 | version = "2.0.100" | ||
| 206 | criteria = "safe-to-deploy" | ||
| 207 | |||
| 208 | [[exemptions.thiserror]] | ||
| 209 | version = "2.0.12" | ||
| 210 | criteria = "safe-to-deploy" | ||
| 211 | |||
| 212 | [[exemptions.thiserror-impl]] | ||
| 213 | version = "2.0.12" | ||
| 214 | criteria = "safe-to-deploy" | ||
| 215 | |||
| 216 | [[exemptions.typenum]] | ||
| 217 | version = "1.18.0" | ||
| 218 | criteria = "safe-to-deploy" | ||
| 219 | |||
| 220 | [[exemptions.vcell]] | ||
| 221 | version = "0.1.3" | ||
| 222 | criteria = "safe-to-deploy" | ||
| 223 | |||
| 224 | [[exemptions.volatile-register]] | ||
| 225 | version = "0.2.2" | ||
| 226 | criteria = "safe-to-deploy" | ||
diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock new file mode 100644 index 000000000..3f541e59f --- /dev/null +++ b/supply-chain/imports.lock | |||
| @@ -0,0 +1,472 @@ | |||
| 1 | |||
| 2 | # cargo-vet imports lock | ||
| 3 | |||
| 4 | [audits.OpenDevicePartnership.audits] | ||
| 5 | |||
| 6 | [[audits.google.audits.autocfg]] | ||
| 7 | who = "Manish Goregaokar <[email protected]>" | ||
| 8 | criteria = "safe-to-deploy" | ||
| 9 | version = "1.4.0" | ||
| 10 | notes = "Contains no unsafe" | ||
| 11 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 12 | |||
| 13 | [[audits.google.audits.bitflags]] | ||
| 14 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 15 | criteria = "safe-to-deploy" | ||
| 16 | version = "1.3.2" | ||
| 17 | notes = """ | ||
| 18 | Security review of earlier versions of the crate can be found at | ||
| 19 | (Google-internal, sorry): go/image-crate-chromium-security-review | ||
| 20 | |||
| 21 | The crate exposes a function marked as `unsafe`, but doesn't use any | ||
| 22 | `unsafe` blocks (except for tests of the single `unsafe` function). I | ||
| 23 | think this justifies marking this crate as `ub-risk-1`. | ||
| 24 | |||
| 25 | Additional review comments can be found at https://crrev.com/c/4723145/31 | ||
| 26 | """ | ||
| 27 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 28 | |||
| 29 | [[audits.google.audits.bytemuck]] | ||
| 30 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 31 | criteria = "safe-to-deploy" | ||
| 32 | version = "1.16.3" | ||
| 33 | notes = """ | ||
| 34 | Review notes from the original audit (of 1.14.3) may be found in | ||
| 35 | https://crrev.com/c/5362675. Note that this audit has initially missed UB risk | ||
| 36 | that was fixed in 1.16.2 - see https://github.com/Lokathor/bytemuck/pull/258. | ||
| 37 | Because of this, the original audit has been edited to certify version `1.16.3` | ||
| 38 | instead (see also https://crrev.com/c/5771867). | ||
| 39 | """ | ||
| 40 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 41 | |||
| 42 | [[audits.google.audits.bytemuck]] | ||
| 43 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 44 | criteria = "safe-to-deploy" | ||
| 45 | delta = "1.16.3 -> 1.17.1" | ||
| 46 | notes = "Unsafe review comments can be found in https://crrev.com/c/5813463" | ||
| 47 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 48 | |||
| 49 | [[audits.google.audits.bytemuck]] | ||
| 50 | who = "Adrian Taylor <[email protected]>" | ||
| 51 | criteria = "safe-to-deploy" | ||
| 52 | delta = "1.17.1 -> 1.18.0" | ||
| 53 | notes = "No code changes - just altering feature flag arrangements" | ||
| 54 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 55 | |||
| 56 | [[audits.google.audits.bytemuck]] | ||
| 57 | who = "Adrian Taylor <[email protected]>" | ||
| 58 | criteria = "safe-to-deploy" | ||
| 59 | delta = "1.18.0 -> 1.19.0" | ||
| 60 | notes = "No code changes - just comment changes and adding the track_caller attribute." | ||
| 61 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 62 | |||
| 63 | [[audits.google.audits.bytemuck]] | ||
| 64 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 65 | criteria = "safe-to-deploy" | ||
| 66 | delta = "1.19.0 -> 1.20.0" | ||
| 67 | notes = "`unsafe` review can be found at https://crrev.com/c/6096767" | ||
| 68 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 69 | |||
| 70 | [[audits.google.audits.bytemuck]] | ||
| 71 | who = "Adrian Taylor <[email protected]>" | ||
| 72 | criteria = "safe-to-deploy" | ||
| 73 | delta = "1.20.0 -> 1.21.0" | ||
| 74 | notes = "Unsafe review at https://chromium-review.googlesource.com/c/chromium/src/+/6111154/" | ||
| 75 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 76 | |||
| 77 | [[audits.google.audits.bytemuck]] | ||
| 78 | who = "Daniel Cheng <[email protected]>" | ||
| 79 | criteria = "safe-to-deploy" | ||
| 80 | delta = "1.21.0 -> 1.22.0" | ||
| 81 | notes = """ | ||
| 82 | This adds new instances of unsafe, but the uses are justified: | ||
| 83 | - BoxBytes is essentially a Box<[u8], which is Send + Sync, so also marking BoxBytes as Send + Sync is justified. | ||
| 84 | - core::num::Saturating<T> meets the criteria for Zeroable + Pod, so marking it as such is justified. | ||
| 85 | |||
| 86 | See https://crrev.com/c/6321863 for more audit notes. | ||
| 87 | """ | ||
| 88 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 89 | |||
| 90 | [[audits.google.audits.byteorder]] | ||
| 91 | who = "danakj <[email protected]>" | ||
| 92 | criteria = "safe-to-deploy" | ||
| 93 | version = "1.5.0" | ||
| 94 | notes = "Unsafe review in https://crrev.com/c/5838022" | ||
| 95 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 96 | |||
| 97 | [[audits.google.audits.cfg-if]] | ||
| 98 | who = "George Burgess IV <[email protected]>" | ||
| 99 | criteria = "safe-to-deploy" | ||
| 100 | version = "1.0.0" | ||
| 101 | aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" | ||
| 102 | |||
| 103 | [[audits.google.audits.either]] | ||
| 104 | who = "Manish Goregaokar <[email protected]>" | ||
| 105 | criteria = "safe-to-deploy" | ||
| 106 | version = "1.13.0" | ||
| 107 | notes = "Unsafe code pertaining to wrapping Pin APIs. Mostly passes invariants down." | ||
| 108 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 109 | |||
| 110 | [[audits.google.audits.either]] | ||
| 111 | who = "Daniel Cheng <[email protected]>" | ||
| 112 | criteria = "safe-to-deploy" | ||
| 113 | delta = "1.13.0 -> 1.14.0" | ||
| 114 | notes = """ | ||
| 115 | Inheriting ub-risk-1 from the baseline review of 1.13.0. While the delta has some diffs in unsafe code, they are either: | ||
| 116 | - migrating code to use helper macros | ||
| 117 | - migrating match patterns to take advantage of default bindings mode from RFC 2005 | ||
| 118 | Either way, the result is code that does exactly the same thing and does not change the risk of UB. | ||
| 119 | |||
| 120 | See https://crrev.com/c/6323164 for more audit details. | ||
| 121 | """ | ||
| 122 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 123 | |||
| 124 | [[audits.google.audits.either]] | ||
| 125 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 126 | criteria = "safe-to-deploy" | ||
| 127 | delta = "1.14.0 -> 1.15.0" | ||
| 128 | notes = "The delta in `lib.rs` only tweaks doc comments and `#[cfg(feature = \"std\")]`." | ||
| 129 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 130 | |||
| 131 | [[audits.google.audits.nb]] | ||
| 132 | who = "George Burgess IV <[email protected]>" | ||
| 133 | criteria = "safe-to-deploy" | ||
| 134 | version = "1.0.0" | ||
| 135 | aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" | ||
| 136 | |||
| 137 | [[audits.google.audits.nb]] | ||
| 138 | who = "George Burgess IV <[email protected]>" | ||
| 139 | criteria = "safe-to-deploy" | ||
| 140 | delta = "1.0.0 -> 0.1.3" | ||
| 141 | aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" | ||
| 142 | |||
| 143 | [[audits.google.audits.nb]] | ||
| 144 | who = "George Burgess IV <[email protected]>" | ||
| 145 | criteria = "safe-to-deploy" | ||
| 146 | delta = "1.0.0 -> 1.1.0" | ||
| 147 | aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" | ||
| 148 | |||
| 149 | [[audits.google.audits.num-traits]] | ||
| 150 | who = "Manish Goregaokar <[email protected]>" | ||
| 151 | criteria = "safe-to-deploy" | ||
| 152 | version = "0.2.19" | ||
| 153 | notes = "Contains a single line of float-to-int unsafe with decent safety comments" | ||
| 154 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 155 | |||
| 156 | [[audits.google.audits.proc-macro2]] | ||
| 157 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 158 | criteria = "safe-to-deploy" | ||
| 159 | version = "1.0.78" | ||
| 160 | notes = """ | ||
| 161 | Grepped for \"crypt\", \"cipher\", \"fs\", \"net\" - there were no hits | ||
| 162 | (except for a benign \"fs\" hit in a doc comment) | ||
| 163 | |||
| 164 | Notes from the `unsafe` review can be found in https://crrev.com/c/5385745. | ||
| 165 | """ | ||
| 166 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 167 | |||
| 168 | [[audits.google.audits.proc-macro2]] | ||
| 169 | who = "Adrian Taylor <[email protected]>" | ||
| 170 | criteria = "safe-to-deploy" | ||
| 171 | delta = "1.0.78 -> 1.0.79" | ||
| 172 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 173 | |||
| 174 | [[audits.google.audits.proc-macro2]] | ||
| 175 | who = "Adrian Taylor <[email protected]>" | ||
| 176 | criteria = "safe-to-deploy" | ||
| 177 | delta = "1.0.79 -> 1.0.80" | ||
| 178 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 179 | |||
| 180 | [[audits.google.audits.proc-macro2]] | ||
| 181 | who = "Dustin J. Mitchell <[email protected]>" | ||
| 182 | criteria = "safe-to-deploy" | ||
| 183 | delta = "1.0.80 -> 1.0.81" | ||
| 184 | notes = "Comment changes only" | ||
| 185 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 186 | |||
| 187 | [[audits.google.audits.proc-macro2]] | ||
| 188 | who = "danakj <[email protected]>" | ||
| 189 | criteria = "safe-to-deploy" | ||
| 190 | delta = "1.0.81 -> 1.0.82" | ||
| 191 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 192 | |||
| 193 | [[audits.google.audits.proc-macro2]] | ||
| 194 | who = "Dustin J. Mitchell <[email protected]>" | ||
| 195 | criteria = "safe-to-deploy" | ||
| 196 | delta = "1.0.82 -> 1.0.83" | ||
| 197 | notes = "Substantive change is replacing String with Box<str>, saving memory." | ||
| 198 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 199 | |||
| 200 | [[audits.google.audits.proc-macro2]] | ||
| 201 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 202 | criteria = "safe-to-deploy" | ||
| 203 | delta = "1.0.83 -> 1.0.84" | ||
| 204 | notes = "Only doc comment changes in `src/lib.rs`." | ||
| 205 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 206 | |||
| 207 | [[audits.google.audits.proc-macro2]] | ||
| 208 | who = "[email protected]" | ||
| 209 | criteria = "safe-to-deploy" | ||
| 210 | delta = "1.0.84 -> 1.0.85" | ||
| 211 | notes = "Test-only changes." | ||
| 212 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 213 | |||
| 214 | [[audits.google.audits.proc-macro2]] | ||
| 215 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 216 | criteria = "safe-to-deploy" | ||
| 217 | delta = "1.0.85 -> 1.0.86" | ||
| 218 | notes = """ | ||
| 219 | Comment-only changes in `build.rs`. | ||
| 220 | Reordering of `Cargo.toml` entries. | ||
| 221 | Just bumping up the version number in `lib.rs`. | ||
| 222 | Config-related changes in `test_size.rs`. | ||
| 223 | """ | ||
| 224 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 225 | |||
| 226 | [[audits.google.audits.proc-macro2]] | ||
| 227 | who = "danakj <[email protected]>" | ||
| 228 | criteria = "safe-to-deploy" | ||
| 229 | delta = "1.0.86 -> 1.0.87" | ||
| 230 | notes = "No new unsafe interactions." | ||
| 231 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 232 | |||
| 233 | [[audits.google.audits.proc-macro2]] | ||
| 234 | who = "Liza Burakova <[email protected]" | ||
| 235 | criteria = "safe-to-deploy" | ||
| 236 | delta = "1.0.87 -> 1.0.89" | ||
| 237 | notes = """ | ||
| 238 | Biggest change is adding error handling in build.rs. | ||
| 239 | Some config related changes in wrapper.rs. | ||
| 240 | """ | ||
| 241 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 242 | |||
| 243 | [[audits.google.audits.proc-macro2]] | ||
| 244 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 245 | criteria = "safe-to-deploy" | ||
| 246 | delta = "1.0.89 -> 1.0.92" | ||
| 247 | notes = """ | ||
| 248 | I looked at the delta and the previous discussion at | ||
| 249 | https://chromium-review.googlesource.com/c/chromium/src/+/5385745/3#message-a8e2813129fa3779dab15acede408ee26d67b7f3 | ||
| 250 | and the changes look okay to me (including the `unsafe fn from_str_unchecked` | ||
| 251 | changes in `wrapper.rs`). | ||
| 252 | """ | ||
| 253 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 254 | |||
| 255 | [[audits.google.audits.proc-macro2]] | ||
| 256 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 257 | criteria = "safe-to-deploy" | ||
| 258 | delta = "1.0.92 -> 1.0.93" | ||
| 259 | notes = "No `unsafe`-related changes." | ||
| 260 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 261 | |||
| 262 | [[audits.google.audits.proc-macro2]] | ||
| 263 | who = "Daniel Cheng <[email protected]>" | ||
| 264 | criteria = "safe-to-deploy" | ||
| 265 | delta = "1.0.93 -> 1.0.94" | ||
| 266 | notes = "Minor doc changes and clippy lint adjustments+fixes." | ||
| 267 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 268 | |||
| 269 | [[audits.google.audits.quote]] | ||
| 270 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 271 | criteria = "safe-to-deploy" | ||
| 272 | version = "1.0.35" | ||
| 273 | notes = """ | ||
| 274 | Grepped for \"unsafe\", \"crypt\", \"cipher\", \"fs\", \"net\" - there were no hits | ||
| 275 | (except for benign \"net\" hit in tests and \"fs\" hit in README.md) | ||
| 276 | """ | ||
| 277 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 278 | |||
| 279 | [[audits.google.audits.quote]] | ||
| 280 | who = "Adrian Taylor <[email protected]>" | ||
| 281 | criteria = "safe-to-deploy" | ||
| 282 | delta = "1.0.35 -> 1.0.36" | ||
| 283 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 284 | |||
| 285 | [[audits.google.audits.quote]] | ||
| 286 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 287 | criteria = "safe-to-deploy" | ||
| 288 | delta = "1.0.36 -> 1.0.37" | ||
| 289 | notes = """ | ||
| 290 | The delta just 1) inlines/expands `impl ToTokens` that used to be handled via | ||
| 291 | `primitive!` macro and 2) adds `impl ToTokens` for `CStr` and `CString`. | ||
| 292 | """ | ||
| 293 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 294 | |||
| 295 | [[audits.google.audits.quote]] | ||
| 296 | who = "Dustin J. Mitchell <[email protected]>" | ||
| 297 | criteria = "safe-to-deploy" | ||
| 298 | delta = "1.0.37 -> 1.0.38" | ||
| 299 | notes = "Still no unsafe" | ||
| 300 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 301 | |||
| 302 | [[audits.google.audits.quote]] | ||
| 303 | who = "Daniel Cheng <[email protected]>" | ||
| 304 | criteria = "safe-to-deploy" | ||
| 305 | delta = "1.0.38 -> 1.0.39" | ||
| 306 | notes = "Only minor changes for clippy lints and documentation." | ||
| 307 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 308 | |||
| 309 | [[audits.google.audits.quote]] | ||
| 310 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 311 | criteria = "safe-to-deploy" | ||
| 312 | delta = "1.0.39 -> 1.0.40" | ||
| 313 | notes = """ | ||
| 314 | The delta is just a simplification of how `tokens.extend(...)` call is made. | ||
| 315 | Still no `unsafe` anywhere. | ||
| 316 | """ | ||
| 317 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 318 | |||
| 319 | [[audits.google.audits.rand_core]] | ||
| 320 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 321 | criteria = "safe-to-deploy" | ||
| 322 | version = "0.6.4" | ||
| 323 | notes = """ | ||
| 324 | For more detailed unsafe review notes please see https://crrev.com/c/6362797 | ||
| 325 | """ | ||
| 326 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 327 | |||
| 328 | [[audits.google.audits.stable_deref_trait]] | ||
| 329 | who = "Manish Goregaokar <[email protected]>" | ||
| 330 | criteria = "safe-to-deploy" | ||
| 331 | version = "1.2.0" | ||
| 332 | notes = "Purely a trait, crates using this should be carefully vetted since self-referential stuff can be super tricky around various unsafe rust edges." | ||
| 333 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 334 | |||
| 335 | [[audits.google.audits.strsim]] | ||
| 336 | who = "[email protected]" | ||
| 337 | criteria = "safe-to-deploy" | ||
| 338 | version = "0.10.0" | ||
| 339 | notes = """ | ||
| 340 | Reviewed in https://crrev.com/c/5171063 | ||
| 341 | |||
| 342 | Previously reviewed during security review and the audit is grandparented in. | ||
| 343 | """ | ||
| 344 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 345 | |||
| 346 | [[audits.google.audits.unicode-ident]] | ||
| 347 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 348 | criteria = "safe-to-deploy" | ||
| 349 | version = "1.0.12" | ||
| 350 | notes = ''' | ||
| 351 | I grepped for \"crypt\", \"cipher\", \"fs\", \"net\" - there were no hits. | ||
| 352 | |||
| 353 | All two functions from the public API of this crate use `unsafe` to avoid bound | ||
| 354 | checks for an array access. Cross-module analysis shows that the offsets can | ||
| 355 | be statically proven to be within array bounds. More details can be found in | ||
| 356 | the unsafe review CL at https://crrev.com/c/5350386. | ||
| 357 | |||
| 358 | This crate has been added to Chromium in https://crrev.com/c/3891618. | ||
| 359 | ''' | ||
| 360 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 361 | |||
| 362 | [[audits.google.audits.unicode-ident]] | ||
| 363 | who = "Dustin J. Mitchell <[email protected]>" | ||
| 364 | criteria = "safe-to-deploy" | ||
| 365 | delta = "1.0.12 -> 1.0.13" | ||
| 366 | notes = "Lots of table updates, and tables are assumed correct with unsafe `.get_unchecked()`, so ub-risk-2 is appropriate" | ||
| 367 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 368 | |||
| 369 | [[audits.google.audits.unicode-ident]] | ||
| 370 | who = "Lukasz Anforowicz <[email protected]>" | ||
| 371 | criteria = "safe-to-deploy" | ||
| 372 | delta = "1.0.13 -> 1.0.14" | ||
| 373 | notes = "Minimal delta in `.rs` files: new test assertions + doc changes." | ||
| 374 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 375 | |||
| 376 | [[audits.google.audits.unicode-ident]] | ||
| 377 | who = "Adrian Taylor <[email protected]>" | ||
| 378 | criteria = "safe-to-deploy" | ||
| 379 | delta = "1.0.14 -> 1.0.15" | ||
| 380 | notes = "No changes relevant to any of these criteria." | ||
| 381 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 382 | |||
| 383 | [[audits.google.audits.unicode-ident]] | ||
| 384 | who = "Liza Burakova <[email protected]>" | ||
| 385 | criteria = "safe-to-deploy" | ||
| 386 | delta = "1.0.15 -> 1.0.16" | ||
| 387 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 388 | |||
| 389 | [[audits.google.audits.unicode-ident]] | ||
| 390 | who = "Daniel Cheng <[email protected]>" | ||
| 391 | criteria = "safe-to-deploy" | ||
| 392 | delta = "1.0.16 -> 1.0.18" | ||
| 393 | notes = "Only minor comment and documentation updates." | ||
| 394 | aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT" | ||
| 395 | |||
| 396 | [[audits.google.audits.void]] | ||
| 397 | who = "George Burgess IV <[email protected]>" | ||
| 398 | criteria = "safe-to-deploy" | ||
| 399 | version = "1.0.2" | ||
| 400 | aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT" | ||
| 401 | |||
| 402 | [[audits.mozilla.audits.crunchy]] | ||
| 403 | who = "Erich Gubler <[email protected]>" | ||
| 404 | criteria = "safe-to-deploy" | ||
| 405 | version = "0.2.3" | ||
| 406 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
| 407 | |||
| 408 | [[audits.mozilla.audits.document-features]] | ||
| 409 | who = "Erich Gubler <[email protected]>" | ||
| 410 | criteria = "safe-to-deploy" | ||
| 411 | version = "0.2.8" | ||
| 412 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
| 413 | |||
| 414 | [[audits.mozilla.audits.document-features]] | ||
| 415 | who = "Erich Gubler <[email protected]>" | ||
| 416 | criteria = "safe-to-deploy" | ||
| 417 | delta = "0.2.8 -> 0.2.9" | ||
| 418 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
| 419 | |||
| 420 | [[audits.mozilla.audits.document-features]] | ||
| 421 | who = "Erich Gubler <[email protected]>" | ||
| 422 | criteria = "safe-to-deploy" | ||
| 423 | delta = "0.2.9 -> 0.2.10" | ||
| 424 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
| 425 | |||
| 426 | [[audits.mozilla.audits.document-features]] | ||
| 427 | who = "Teodor Tanasoaia <[email protected]>" | ||
| 428 | criteria = "safe-to-deploy" | ||
| 429 | delta = "0.2.10 -> 0.2.11" | ||
| 430 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
| 431 | |||
| 432 | [[audits.mozilla.audits.fnv]] | ||
| 433 | who = "Bobby Holley <[email protected]>" | ||
| 434 | criteria = "safe-to-deploy" | ||
| 435 | version = "1.0.7" | ||
| 436 | notes = "Simple hasher implementation with no unsafe code." | ||
| 437 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
| 438 | |||
| 439 | [[audits.mozilla.audits.half]] | ||
| 440 | who = "John M. Schanck <[email protected]>" | ||
| 441 | criteria = "safe-to-deploy" | ||
| 442 | version = "1.8.2" | ||
| 443 | notes = """ | ||
| 444 | This crate contains unsafe code for bitwise casts to/from binary16 floating-point | ||
| 445 | format. I've reviewed these and found no issues. There are no uses of ambient | ||
| 446 | capabilities. | ||
| 447 | """ | ||
| 448 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
| 449 | |||
| 450 | [[audits.mozilla.audits.half]] | ||
| 451 | who = "Erich Gubler <[email protected]>" | ||
| 452 | criteria = "safe-to-deploy" | ||
| 453 | delta = "1.8.2 -> 1.8.3" | ||
| 454 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
| 455 | |||
| 456 | [[audits.mozilla.audits.half]] | ||
| 457 | who = "Erich Gubler <[email protected]>" | ||
| 458 | criteria = "safe-to-deploy" | ||
| 459 | delta = "1.8.3 -> 2.5.0" | ||
| 460 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
| 461 | |||
| 462 | [[audits.mozilla.audits.litrs]] | ||
| 463 | who = "Erich Gubler <[email protected]>" | ||
| 464 | criteria = "safe-to-deploy" | ||
| 465 | version = "0.4.1" | ||
| 466 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
| 467 | |||
| 468 | [[audits.mozilla.audits.strsim]] | ||
| 469 | who = "Ben Dean-Kawamura <[email protected]>" | ||
| 470 | criteria = "safe-to-deploy" | ||
| 471 | delta = "0.10.0 -> 0.11.1" | ||
| 472 | aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" | ||
