-
Notifications
You must be signed in to change notification settings - Fork 2
initial OCI support #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d8d678f
initial OCI support
bennyz 05ced89
add support for flashing from an OCI image
bennyz c1cab54
fix XZ handling and clippy
bennyz 0e3220e
address review
bennyz 9a1a0c2
refactor to reduce cruft
bennyz 700674b
fix decompression progress bar
bennyz d33c9a8
refactor according to review
bennyz fd2ab7d
simplify code
bennyz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Generated by Cargo | ||
| # will have compiled files and executables | ||
| debug | ||
| target | ||
|
|
||
| # These are backup files generated by rustfmt | ||
| **/*.rs.bk | ||
|
|
||
| # MSVC Windows builds of rustc generate these, which store debugging information | ||
| *.pdb | ||
|
|
||
| # Generated by cargo mutants | ||
| # Contains mutation testing data | ||
| **/mutants.out*/ | ||
|
|
||
| # RustRover | ||
| # JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
| # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
| # and can be added to the global gitignore or merged into this file. For a more nuclear | ||
| # option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
| #.idea/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| //! Unified compression type detection and handling | ||
| //! | ||
| //! This module provides a single source of truth for compression types | ||
| //! used across both OCI and URL-based flash operations. | ||
|
|
||
| /// Compression type for data streams | ||
| #[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
| pub enum Compression { | ||
| /// No compression - raw data | ||
| None, | ||
| /// Gzip compression (.gz) | ||
| Gzip, | ||
| /// XZ/LZMA compression (.xz) | ||
| Xz, | ||
| /// Zstandard compression (.zst) | ||
| Zstd, | ||
| } | ||
|
|
||
| impl std::fmt::Display for Compression { | ||
| fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
| match self { | ||
| Compression::None => write!(f, "none"), | ||
| Compression::Gzip => write!(f, "gzip"), | ||
| Compression::Xz => write!(f, "xz"), | ||
| Compression::Zstd => write!(f, "zstd"), | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: jumpstarter-dev/fls
Length of output: 1693
🌐 Web query:
security vulnerabilities serde 1.0 rust crate CVE💡 Result:
Here are the publicly disclosed security issues (CVEs/advisories) related to Serde and Serde-related crates that have affected the 1.0-era ecosystem:
Recommended action: audit your dependency tree for crates that depend on serde (and serde-* formats), and upgrade affected crates to the fixed versions above (or to the latest releases). For crates you maintain, avoid enabling non-default features that introduce unchecked Deserialize implementations until you’ve reviewed input validation. Use cargo audit / cargo-deny and monitor RustSec/NVD advisories for ongoing updates.
Sources:
🌐 Web query:
security vulnerabilities base64 0.22 rust crate💡 Result:
Short answer: there are no public RustSec/CVE advisories specific to base64 crate v0.22.x. The notable security issue for the crate is an older integer-overflow / heap-buffer-overflow advisory (RUSTSEC-2017-0004 / CVE-2017-1000430) that affected much earlier versions and was fixed long ago; v0.22.x is not listed as affected. See sources below.
Sources:
References:
[1] rustsec / OSV RUSTSEC-2017-0004 (CVE-2017-1000430).
[2] base64 0.22.0 crate info (deps.rs / docs.rs).
[3] RUSTSEC-2024-0354 (vodozemac: non-constant-time base64 usage).
🌐 Web query:
security vulnerabilities tar 0.4 flate2 1.0 rust crate CVE💡 Result:
Short answer:
Sources:
🌐 Web query:
security vulnerabilities xz2 0.1 rust crate💡 Result:
Short answer: yes — xz2 (0.1.x) is a wrapper around liblzma, so security issues in liblzma/xz-utils affect it. Two high‑impact incidents to be aware of:
What to do:
Sources:
[1] Snyk advisory on embedded malicious code in liblzma / xz (disclosed Mar 29, 2024).
[2] Tukaani (xz) backdoor / incident pages and timeline.
[3] Tukaani advisory for CVE‑2025‑31115 (Apr 3, 2025).
[4] NVD entry for CVE‑2025‑31115.
Fix tar dependency version constraint to address CVE-2021-38511.
The tar 0.4 dependency allows versions below 0.4.36, which are vulnerable to directory traversal via symlink extraction (CVE-2021-38511)—directly relevant to the stated layer extraction functionality. Update to
tar = "0.4.36"or usetar = { version = "0.4", features = [...], ">= 0.4.36" }.Additionally, xz2 0.1 wraps liblzma which has CVE-2025-31115 (use-after-free in multithreaded decoder affecting liblzma versions before 5.8.1). Verify the vendored/linked liblzma version is patched, or upgrade xz2 if a fixed release is available.
The other dependencies (serde, serde_json, base64, flate2) have no known public vulnerabilities in the specified versions.
🤖 Prompt for AI Agents