├── .cargo
└── config.toml
├── .devcontainer
└── devcontainer.json
├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── pull_request_template.md
└── workflows
│ ├── commits.yml
│ ├── release.yml
│ └── test.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── LICENSE
├── README.md
├── SECURITY.md
├── assets
└── omnibor-logo.svg
├── dist-workspace.toml
├── omnibor-cli
├── CHANGELOG.md
├── Cargo.toml
├── README.md
├── config
│ └── omnibor.json
├── src
│ ├── app.rs
│ ├── cli.rs
│ ├── cmd
│ │ ├── artifact
│ │ │ ├── find.rs
│ │ │ ├── id.rs
│ │ │ └── mod.rs
│ │ ├── debug
│ │ │ ├── mod.rs
│ │ │ └── paths.rs
│ │ ├── manifest
│ │ │ ├── create.rs
│ │ │ └── mod.rs
│ │ ├── mod.rs
│ │ └── store
│ │ │ ├── add.rs
│ │ │ ├── log.rs
│ │ │ ├── mod.rs
│ │ │ └── remove.rs
│ ├── config.rs
│ ├── error.rs
│ ├── fs.rs
│ ├── log.rs
│ ├── main.rs
│ └── print
│ │ ├── error.rs
│ │ ├── find_file.rs
│ │ ├── id_file.rs
│ │ ├── mod.rs
│ │ └── paths.rs
└── tests
│ ├── data
│ └── main.c
│ ├── snapshots
│ ├── test__artifact_id_json.snap
│ ├── test__artifact_id_plain.snap
│ ├── test__artifact_id_short.snap
│ ├── test__artifact_no_args.snap
│ ├── test__debug_no_args.snap
│ ├── test__manifest_no_args.snap
│ └── test__no_args.snap
│ └── test.rs
├── omnibor
├── CHANGELOG.md
├── Cargo.toml
├── README.md
├── benches
│ └── benchmark.rs
├── src
│ ├── artifact_id
│ │ ├── artifact_id.rs
│ │ ├── artifact_id_builder.rs
│ │ └── mod.rs
│ ├── embedding_mode.rs
│ ├── error
│ │ ├── artifact_id_error.rs
│ │ ├── input_manifest_error.rs
│ │ └── mod.rs
│ ├── ffi
│ │ ├── artifact_id.rs
│ │ ├── error.rs
│ │ ├── mod.rs
│ │ ├── status.rs
│ │ └── util.rs
│ ├── gitoid
│ │ ├── gitoid.rs
│ │ ├── gitoid_url_parser.rs
│ │ ├── internal.rs
│ │ └── mod.rs
│ ├── hash_algorithm.rs
│ ├── hash_provider
│ │ ├── boringssl.rs
│ │ ├── mod.rs
│ │ ├── openssl.rs
│ │ └── rustcrypto.rs
│ ├── input_manifest
│ │ ├── input_manifest.rs
│ │ ├── input_manifest_builder.rs
│ │ └── mod.rs
│ ├── lib.rs
│ ├── object_type.rs
│ ├── storage
│ │ ├── file_system_storage.rs
│ │ ├── in_memory_storage.rs
│ │ ├── mod.rs
│ │ └── test.rs
│ ├── test.rs
│ └── util
│ │ ├── clone_as_boxstr.rs
│ │ ├── for_each_buf_fill.rs
│ │ ├── mod.rs
│ │ ├── pathbuf.rs
│ │ ├── sealed.rs
│ │ └── stream_len.rs
└── test
│ └── data
│ ├── hello_world.txt
│ ├── unix_line.txt
│ └── windows_line.txt
└── xtask
├── Cargo.toml
├── README.md
└── src
├── cli.rs
├── main.rs
├── pipeline.rs
└── release.rs
/.cargo/config.toml:
--------------------------------------------------------------------------------
1 |
2 | [alias]
3 | xtask = "run --package xtask --"
4 |
5 | [build]
6 | # Needed for using `tokio_console` with the CLI.
7 | rustflags = ["--cfg", "tokio_unstable"]
8 |
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "omnibor-dev-container",
3 | "image": "mcr.microsoft.com/devcontainers/universal:2-linux",
4 | "features": {
5 | "ghcr.io/devcontainers/features/rust:1": {
6 | "version": "1.75.0",
7 | "profile": "default"
8 | }
9 | },
10 | "postCreateCommand": "cargo install cbindgen"
11 | }
12 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Windows test file that should _always_ use DOS-style newlines,
2 | # regardless of the current system. Used for tests to validate
3 | # newline normalization is working.
4 | windows_line.txt text eol=crlf
5 |
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Version [e.g. 22]
29 |
30 | **Smartphone (please complete the following information):**
31 | - Device: [e.g. iPhone6]
32 | - OS: [e.g. iOS8.1]
33 | - Version [e.g. 22]
34 |
35 | **Additional context**
36 | Add any other context about the problem here.
37 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Description
4 |
5 |
6 | ## Related Issue
7 |
8 |
9 |
10 |
11 |
12 | ## Motivation and Context
13 |
14 |
15 |
16 | ## How Has This Been Tested?
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/.github/workflows/commits.yml:
--------------------------------------------------------------------------------
1 | name: Commit Checks
2 |
3 | on:
4 | pull_request:
5 | branches: [main]
6 |
7 | permissions:
8 | contents: read
9 |
10 | jobs:
11 | conventional-commits:
12 | name: Conventional Commits
13 | runs-on: ubuntu-latest
14 | timeout-minutes: 5
15 | steps:
16 | - uses: actions/checkout@v4
17 | - uses: webiny/action-conventional-commits@v1.3.0
18 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: Test
2 |
3 | # Run on both PRs and pushes to the main branch.
4 | # It may seem redundant to run tests on main, since we disallow pushing directly
5 | # to main and all PRs get tested before merging.
6 | #
7 | # But due to how GitHub Actions isolates caches, we need to run the tests on
8 | # main so that caches are available to new PRs. The caches created when testing
9 | # PR code cannot be re-used outside of testing that PR.
10 | #
11 | # See the GitHub Actions documentation here:
12 | # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache
13 | on:
14 | push:
15 | branches: [main]
16 | paths:
17 | - "gitoid/**"
18 | - "omnibor/**"
19 | - "omnibor-cli/**"
20 | - "xtask/**"
21 | pull_request:
22 | branches: [main]
23 | paths:
24 | - "gitoid/**"
25 | - "omnibor/**"
26 | - "omnibor-cli/**"
27 | - "xtask/**"
28 |
29 | permissions:
30 | contents: read
31 |
32 | env:
33 | RUSTFLAGS: -Dwarnings
34 | CARGO_TERM_COLOR: always
35 | # Necessary for 'cargo-insta' to handle CI behavior correctly.
36 | CI: true
37 |
38 | jobs:
39 | test:
40 | strategy:
41 | matrix:
42 | os: [ubuntu-22.04, windows-2019, macos-13, macos-14]
43 | name: "${{ matrix.os }}"
44 | runs-on: ${{ matrix.os }}
45 | timeout-minutes: 15
46 | steps:
47 | - uses: actions/checkout@v4
48 | - uses: dtolnay/rust-toolchain@stable
49 | - uses: swatinem/rust-cache@v2
50 | with:
51 | key: ${{ matrix.os }}
52 | - name: Dependency Tree
53 | run: cargo tree
54 | - name: Check
55 | run: cargo check --verbose --workspace
56 | - name: Test
57 | run: cargo test --verbose --workspace
58 | - name: Lint
59 | run: cargo clippy --verbose --workspace
60 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | .vscode/
3 | Cargo.lock
4 | gitoid.h
5 | gitoid/test/c_test
6 | c-test.exe
7 | c-test
8 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
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, religion, or sexual identity
10 | 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
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of 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
35 | address, 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 | gitbom.infra@gmail.com.
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
86 | of 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
93 | permanent 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
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | We're happy to accept contributions!
4 |
5 | For bug fixes and minor changes to the implementation, feel free to open an issue
6 | in the issue tracker explaining what you'd like to fix, and then open a Pull
7 | Request with the change.
8 |
9 | For larger design changes, you may also want to discuss the changes either in the
10 | issue tracker or in the repository's Discussions page.
11 |
12 | ## Developer Certificate of Origin
13 |
14 | Contributions to this repository are under the [Developer Certificate of Origin][dco]
15 | rules and are indicated by signing off on commits with the `-s`/`--signoff` flag
16 | when committing. This is enforced with a DCO CI job that checks your commits for
17 | signoff. If you forget to do it, the CI job gives instructions on how to fix
18 | your commits to include the signoff.
19 |
20 | [dco]: https://developercertificate.org/
21 |
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 |
2 | # Overall workspace configuration.
3 | [workspace]
4 |
5 | members = ["omnibor", "omnibor-cli", "xtask"]
6 | resolver = "2"
7 |
8 | # Shared settings across packages in the workspace.
9 | [workspace.package]
10 |
11 | edition = "2021"
12 | license = "Apache-2.0"
13 | license-file = "LICENSE"
14 | homepage = "https://omnibor.io"
15 |
16 | [profile.dev.package]
17 | insta.opt-level = 3
18 | similar.opt-level = 3
19 |
20 | # The profile that 'cargo dist' will build with
21 | [profile.dist]
22 |
23 | inherits = "release"
24 |
25 | lto = "thin"
26 |
27 |
28 | #============================================================================
29 | # Config for 'cargo release'
30 | #----------------------------------------------------------------------------
31 |
32 | [workspace.metadata.release]
33 |
34 | # Commit message to use when doing a release.
35 | pre-release-commit-message = "chore: Release {{crate_name}}-v{{version}}"
36 |
37 | # Whether to use a single commit when releasing versions of multiple
38 | # crates in a workspace.
39 | consolidate-commits = false
40 |
41 |
42 | #============================================================================
43 | # Config for 'git cliff'
44 | #----------------------------------------------------------------------------
45 |
46 | [workspace.metadata.git-cliff.changelog]
47 |
48 | trim = true
49 |
50 | header = """
51 | # Changelog\n
52 | All notable changes to this project will be documented in this file.
53 |
54 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
56 | """
57 |
58 | body = """
59 | {% if version -%}
60 | ## [{{ version | split(pat="-") | last | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
61 | {% else -%}
62 | ## [Unreleased]
63 | {% endif -%}
64 | {% for group, commits in commits | group_by(attribute="group") %}
65 | ### {{ group | upper_first }}
66 | {% for commit in commits %}
67 | - {{ commit.message | upper_first }}\
68 | {% endfor %}
69 | {% endfor %}\n
70 | """
71 |
72 | footer = """
73 | {% for release in releases -%}
74 | {% if release.version -%}
75 | {% if release.previous.version -%}
76 | [{{ release.version | split(pat="-") | last | trim_start_matches(pat="v") }}]: \
77 | https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
78 | /compare/{{ release.previous.version }}..{{ release.version }}
79 | {% endif -%}
80 | {% else -%}
81 | [unreleased]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
82 | /compare/{{ release.previous.version }}..HEAD
83 | {% endif -%}
84 | {% endfor %}
85 |
86 | """
87 |
88 | [workspace.metadata.git-cliff.git]
89 |
90 | # parse the commits based on https://www.conventionalcommits.org
91 | conventional_commits = true
92 |
93 | # filter out the commits that are not conventional
94 | filter_unconventional = true
95 |
96 | # process each line of a commit as an individual commit
97 | split_commits = false
98 |
99 | # regex for parsing and grouping commits
100 | commit_parsers = [
101 | { message = "^.*: add", group = "Added" },
102 | { message = "^.*: support", group = "Added" },
103 | { message = "^.*: remove", group = "Removed" },
104 | { message = "^.*: delete", group = "Removed" },
105 | { message = "^test", group = "Fixed" },
106 | { message = "^fix", group = "Fixed" },
107 | { message = "^.*: fix", group = "Fixed" },
108 | { message = "^.*", group = "Changed" },
109 | ]
110 |
111 | # protect breaking changes from being skipped due to matching a skipping commit_parser
112 | protect_breaking_commits = false
113 |
114 | # filter out the commits that are not matched by commit parsers
115 | filter_commits = true
116 |
117 | # regex for matching git tags
118 | tag_pattern = "v[0-9].*"
119 |
120 | # regex for skipping tags
121 | skip_tags = "v0.1.0-beta.1"
122 |
123 | # regex for ignoring tags
124 | ignore_tags = ""
125 |
126 | # sort the tags topologically
127 | topo_order = false
128 |
129 | # sort the commits inside sections by oldest/newest order
130 | sort_commits = "oldest"
131 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
14 |
15 | ## What is OmniBOR?
16 |
17 | [OmniBOR][omnibor] is a draft specification which defines two key concepts:
18 |
19 | - __Artifact Identifiers__: independently-reproducible identifiers for
20 | software artifacts.
21 | - __Artifact Input Manifests__: record the IDs of every input used in the
22 | build process for an artifact.
23 |
24 | Artifact IDs enable _anyone_ to identify and cross-reference information for
25 | software artifacts without a central authority. Unlike [pURL][purl] or [CPE][cpe],
26 | OmniBOR Artifact IDs don't rely on a third-party, they are _inherent
27 | identifiers_ determined only by an artifact itself. They're based on
28 | [Git's Object IDs (GitOIDs)][gitoid] in both construction and choice of
29 | cryptographic hash functions.
30 |
31 | Artifact Input Manifests allow consumers to reconstruct Artifact Dependency
32 | Graphs that give _fine-grained_ visibility into how artifacts in your
33 | software supply chain were made. With these graphs, consumers could
34 | in the future identify the presence of exact files associated with known
35 | vulnerabilities, side-stepping the complexities of matching version numbers
36 | across platforms and patching practicies.
37 |
38 | [__You can view the OmniBOR specification here.__][omnibor_spec]
39 |
40 | The United States Cybersecurity & Infrastructure Security Agency (CISA),
41 | identified OmniBOR as a major candidate for software identities
42 | in its 2023 report ["Software Identification Ecosystem Option
43 | Analysis."][cisa_report]
44 |
45 | ## What's in this Repository?
46 |
47 | | Crate Name | Type | Purpose | Links |
48 | |:--------------|:----------------------------------------------------------|:------------------------------------------|:----------------------------------------------------------------------------------------------------------------|
49 | | `omnibor` |  | OmniBOR Identifiers and Manifests | [README][omnibor_r] · [Changelog][omnibor_c] · [API Docs][omnibor_d] · [Crate][omnibor_cr] |
50 | | `omnibor-cli` |  | CLI for OmniBOR Identifiers and Manifests | [README][omnibor_cli_r] · [Changelog][omnibor_cli_c] · [Crate][omnibor_cli_cr] |
51 | | `xtask` |  | OmniBOR Rust Workspace Automation | [README][xtask_r] |
52 |
53 | ## Contributing
54 |
55 | __We happily accept contributions to any of the packages in this repository!__
56 |
57 | All contributed commits _must_ include a Developer Certificate of Origin
58 | sign-off (use the `--signoff` flag when running `git commit`). This is checked
59 | by Continuous Integration tests to make sure you don't miss it! You can
60 | [learn more on the DCO website][dco].
61 |
62 | Contributors do not sign any Contributor License Agreement. Your contributions
63 | remain owned by you, licensed for use in OmniBOR under the terms of the Apache
64 | 2.0 license.
65 |
66 | Check out the full [Contributing Guide][contributing] to learn more!
67 |
68 | ## Discussions & Support
69 |
70 | If you've encountered [specific bugs][bugs] or have specific
71 | [feature requests][features], we recommend opening issues in the
72 | [issue tracker][issues]!
73 |
74 | However, if you have more open-ended ideas, want to ask questions
75 | about OmniBOR or the OmniBOR Rust implementation, or want to get support
76 | debugging an issue you've encountered, we recommend opening a new
77 | [discussion][discussion].
78 |
79 | If you believe you've found a security vulnerability, please
80 | [report it to us][vuln].
81 |
82 | ## Security
83 |
84 | The project maintains an official [Security Policy][security] and accepts
85 | security disclosures through GitHub.
86 |
87 | ## Code of Conduct
88 |
89 | All discussions, issues, pull requests, and other communication spaces
90 | associated with this project require participants abide by the project's
91 | [Code of Conduct][coc] (Contributor Covenant 2.0).
92 |
93 | ## License
94 |
95 | All crates in this repository are Apache 2.0 licensed. You can read the full
96 | license text in the [`LICENSE`][license] file.
97 |
98 | [contributing]: CONTRIBUTING.md
99 | [cbindgen]: https://github.com/eqrion/cbindgen
100 | [cisa_report]: https://www.cisa.gov/sites/default/files/2023-10/Software-Identification-Ecosystem-Option-Analysis-508c.pdf
101 | [cpe]: https://nvd.nist.gov/products/cpe
102 | [gitoid]: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects
103 | [license]: https://github.com/omnibor/omnibor-rs/blob/main/LICENSE
104 | [omnibor]: https://omnibor.io
105 | [omnibor_cr]: https://crates.io/crates/omnibor
106 | [omnibor_r]: https://github.com/omnibor/omnibor-rs/blob/main/omnibor/README.md
107 | [omnibor_c]: https://github.com/omnibor/omnibor-rs/blob/main/omnibor/CHANGELOG.md
108 | [omnibor_d]: https://docs.rs/crate/omnibor/latest
109 | [omnibor_cli_r]: https://github.com/omnibor/omnibor-rs/blob/main/omnibor-cli/README.md
110 | [omnibor_cli_c]: https://github.com/omnibor/omnibor-rs/blob/main/omnibor-cli/CHANGELOG.md
111 | [omnibor_cli_cr]: https://crates.io/crates/omnibor-cli
112 | [omnibor_spec]: https://github.com/omnibor/spec
113 | [purl]: https://github.com/package-url/purl-spec
114 | [xtask_r]: https://github.com/omnibor/omnibor-rs/blob/main/xtask/README.md
115 | [dco]: https://developercertificate.org/
116 | [security]: https://github.com/omnibor/omnibor-rs/blob/main/SECURITY.md
117 | [coc]: https://github.com/omnibor/omnibor-rs/blob/main/CODE_OF_CONDUCT.md
118 | [bugs]: https://github.com/omnibor/omnibor-rs/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=
119 | [features]: https://github.com/omnibor/omnibor-rs/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=
120 | [issues]: https://github.com/omnibor/omnibor-rs/issues
121 | [discussion]: https://github.com/omnibor/omnibor-rs/discussions
122 | [vuln]: https://github.com/omnibor/omnibor-rs/security/advisories/new
123 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | The following is the security policy for:
4 |
5 | - The `gitoid` library crate.
6 | - The `omnibor` library crate.
7 | - The `omnibor_cli` binary crate.
8 |
9 | All of which are found in this workspace.
10 |
11 | ## Reporting a Vulnerability
12 |
13 | Vulnerabilities can be reported using the "Report a Vulnerability" button under
14 | the security tab of the repository. If a vulnerability is found to be legitimate,
15 | a RustSec advisory will be created.
16 |
17 | Please give us 90 days to respond to a vulnerability disclosure. In general, we
18 | will try to be faster than that to produce fixes and respond publicly to
19 | disclosures.
20 |
21 | If we accept the legitimacy of a vulnerability, please wait for us to have
22 | publcily responded to the vulnerability, including publication of new versions,
23 | yanking of old versions, and public disclosure in the RustSec database, before
24 | publicly disclosing the vulnerability yourself.
25 |
26 | We ask that you _not_ create advisories yourself, but instead submit
27 | vulnerability reports to us first so we can plan a response including
28 | producing any necessary patches, publishing fixed versions, yanking affected
29 | versions, and communicating about the vulnerability to users.
30 |
31 | We consider soundness violations (violations of safe Rust's memory, thread, or
32 | type safety guarantees) to be at least informational vulnerabilities and
33 | will treat them as such.
34 |
35 | RustSec advisories are automatically imported into the GitHub Security Advisory
36 | system, and into the OSV database, so duplicate reports do not need to be made
37 | for those systems.
38 |
--------------------------------------------------------------------------------
/dist-workspace.toml:
--------------------------------------------------------------------------------
1 | [workspace]
2 | members = ["cargo:."]
3 |
4 | # Config for 'dist'
5 | [dist]
6 | # The preferred dist version to use in CI (Cargo.toml SemVer syntax)
7 | cargo-dist-version = "0.28.0"
8 | # CI backends to support
9 | ci = "github"
10 | # The installers to generate for each app
11 | installers = ["shell", "powershell", "homebrew"]
12 | # Target platforms to build apps for (Rust target-triple syntax)
13 | targets = [
14 | "aarch64-apple-darwin",
15 | "aarch64-unknown-linux-gnu",
16 | "aarch64-pc-windows-msvc",
17 | "x86_64-apple-darwin",
18 | "x86_64-unknown-linux-gnu",
19 | "x86_64-unknown-linux-musl",
20 | "x86_64-pc-windows-msvc",
21 | ]
22 | # Which actions to run on pull requests
23 | pr-run-mode = "plan"
24 | # Whether to install an updater program
25 | install-updater = true
26 | # Whether to enable GitHub Attestations
27 | github-attestations = true
28 | # Path that installers should place binaries in
29 | install-path = ["~/.local/bin", "~/.omnibor/bin"]
30 |
31 | # NOTE: MUST be synced manually with runners in `.github/workflows/hipcheck.yml`
32 | [dist.github-custom-runners]
33 | global = "ubuntu-22.04"
34 | # Ensure Apple Silicon macOS builds run natively rather than cross-compiling
35 | # from x86. Also makes sure our Apple Silicon macOS release builds match the
36 | # runner used for regular CI testing.
37 | aarch64-apple-darwin = "macos-14"
38 | # Update our Ubuntu release runs away from Ubuntu 20.04, which is now being
39 | # sunset by GitHub. They only track the last two LTS Ubuntu releases for free
40 | # runners, and with 24.04 out they're sunsetting 20.04. We're *just* moving to
41 | # 22.04, since releases compiled against 22.04's glibc should be forwards-
42 | # compatible with 24.04, but if we built on 24.04 the glibc *would not* be
43 | # backwards-compatible.
44 | x86_64-unknown-linux-gnu = "ubuntu-22.04"
45 |
--------------------------------------------------------------------------------
/omnibor-cli/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file.
4 |
5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7 |
8 | ## [0.8.0] - 2025-02-04
9 |
10 | ### Changed
11 |
12 | - Big refactor. (#234)
13 | - Release omnibor-v0.8.0
14 |
15 | ## [0.7.0] - 2025-01-29
16 |
17 | ### Changed
18 |
19 | - Show help when missing args for all cmds. (#209)
20 | - Add snapshot testing for CLI. (#210)
21 | - Introduce PrintSender type (#212)
22 | - Identify files in parallel. (#214)
23 | - Added snapshot tests for `omnibor artifact id` (#213)
24 | - Parallelize 'artifact find' (#216)
25 | - Remove "buffer" tunable. (#217)
26 | - Introduce config for tunables (#218)
27 | - Turn `debug config` into `debug paths` (#219)
28 | - Added color output (#221)
29 | - Improve error reporting. (#222)
30 | - Introduce new "store" subcommand. (#223)
31 | - Make adding manifest to store optional. (#224)
32 | - Change naming of manifest file. (#226)
33 | - Support the --no-out flag on `manifest create` (#227)
34 | - Implement newline normalization. (#228)
35 | - Release omnibor-v0.7.0
36 |
37 | ## [0.7.0] - 2024-09-26
38 |
39 | ### Changed
40 |
41 | - Update omnibor-cli CHANGELOG for 0.7.0
42 | - Release omnibor-cli-v0.7.0
43 |
44 | ## [0.6.0] - 2024-09-26
45 |
46 | ### Changed
47 |
48 | - Update project and crate READMEs (#173)
49 | - Fallback to sync printing if needed. (#178)
50 | - Update `omnibor-cli/README.md` (#179)
51 | - Release omnibor-v0.6.0
52 |
53 | ### Fixed
54 |
55 | - Correct typo in CLI `README.md`
56 |
57 | ## [0.6.0] - 2024-03-08
58 |
59 | ### Changed
60 |
61 | - Split out CLI to its own package. (#171)
62 | - Update `omnibor-cli` crate CHANGELOG.md
63 | - Release omnibor-cli-v0.6.0
64 |
65 | ### Fixed
66 |
67 | - Fix broken version parsing in release (#172)
68 |
69 | [0.8.0]: https://github.com/omnibor/omnibor-rs/compare/omnibor-v0.7.0..omnibor-v0.8.0
70 | [0.7.0]: https://github.com/omnibor/omnibor-rs/compare/omnibor-cli-v0.7.0..omnibor-v0.7.0
71 | [0.7.0]: https://github.com/omnibor/omnibor-rs/compare/omnibor-v0.6.0..omnibor-cli-v0.7.0
72 | [0.6.0]: https://github.com/omnibor/omnibor-rs/compare/omnibor-cli-v0.6.0..omnibor-v0.6.0
73 | [0.6.0]: https://github.com/omnibor/omnibor-rs/compare/omnibor-v0.5.1..omnibor-cli-v0.6.0
74 |
75 |
76 |
--------------------------------------------------------------------------------
/omnibor-cli/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 |
3 | name = "omnibor-cli"
4 | version = "0.8.0"
5 |
6 | description = "CLI for working with OmniBOR Identifiers and Manifests"
7 | repository = "https://github.com/omnibor/omnibor-rs"
8 | readme = "README.md"
9 | categories = ["cryptography", "development-tools"]
10 | keywords = ["gitbom", "omnibor", "sbom"]
11 |
12 | edition.workspace = true
13 | license.workspace = true
14 | homepage.workspace = true
15 |
16 | # Surprisingly, setting this on the package-specific manifest for
17 | # `omnibor-cli` configures the default-run binary for the entire
18 | # workspace. This... should probably be fixed to be properly set
19 | # on the workspace-root manifest, but for now this works.
20 | default-run = "omnibor"
21 |
22 | # Tell Cargo that the binary name should be "omnibor",
23 | # not "omnibor-cli". Otherwise it'll default to the name of the package.
24 | [[bin]]
25 |
26 | name = "omnibor"
27 | path = "src/main.rs"
28 |
29 | [dependencies]
30 | async-channel = "2.3.1"
31 |
32 | async-walkdir = "1.0.0"
33 | clap = { version = "4.5.1", features = ["derive", "env"] }
34 | clap-verbosity-flag = "2.2.2"
35 | console = "0.15.8"
36 | console-subscriber = "0.4.1"
37 | dirs = "5.0.1"
38 | dyn-clone = "1.0.17"
39 | futures-lite = "2.2.0"
40 | futures-util = "0.3.31"
41 | omnibor = { version = "0.9.0", path = "../omnibor" }
42 | pathbuf = "1.0.0"
43 | serde = { version = "1.0.215", features = ["derive"] }
44 | serde_json = "1.0.114"
45 | thiserror = "2.0.3"
46 | tokio = { version = "1.36.0", features = [
47 | "fs",
48 | "io-std",
49 | "io-util",
50 | "macros",
51 | "rt",
52 | "rt-multi-thread",
53 | "sync",
54 | "time",
55 | "tracing",
56 | ] }
57 | tracing = "0.1.40"
58 | tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
59 | url = "2.5.0"
60 |
61 | [dev-dependencies]
62 | insta = { version = "1.41.1", features = ["yaml", "filters"] }
63 | insta-cmd = "0.6.0"
64 |
--------------------------------------------------------------------------------
/omnibor-cli/README.md:
--------------------------------------------------------------------------------
1 |
2 |