Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 8, 2025

Bumps the s3s group with 1 update: s3s.

Updates s3s from 0.12.0-rc.4 to 0.12.0-rc.5

Commits
  • 0e52387 release v0.12.0-rc.5
  • abfd2cc Add tests for PUT presigned URL signature verification (#402)
  • b0d16a0 fix(s3s): fix unbounded memory allocation in http::body (#407)
  • 4752860 feat(s3s): impl etag comparison (#410)
  • fd56de9 fix(s3s/sig_v4): update error message for x-amz-content-sha256 mismatch and h...
  • a6446bf feat(s3s): use strongly typed ETag for conditional request headers (#403)
  • 0ed460e fix(model): ignore EntityTooLarge 405
  • aea9bd4 build(deps): bump the dependencies group with 7 updates (#401)
  • a073af1 fix(s3s/ops): differentiate Get and List operations by id parameter (#392) (#...
  • 2c20f0b fix(s3s/http): prevent unbounded memory allocation in POST object (#370) (#390)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Bumps the s3s group with 1 update: [s3s](https://github.com/Nugine/s3s).


Updates `s3s` from 0.12.0-rc.4 to 0.12.0-rc.5
- [Changelog](https://github.com/s3s-project/s3s/blob/main/CHANGELOG.md)
- [Commits](s3s-project/s3s@v0.12.0-rc.4...v0.12.0-rc.5)

---
updated-dependencies:
- dependency-name: s3s
  dependency-version: 0.12.0-rc.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: s3s
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Dec 8, 2025
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/checkout 6.*.* 🟢 6.3
Details
CheckScoreReason
Maintained🟢 34 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Code-Review🟢 10all changesets reviewed
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
License🟢 10license file detected
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Signed-Releases⚠️ -1no releases found
Fuzzing⚠️ 0project is not fuzzed
Security-Policy🟢 9security policy file detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Branch-Protection🟢 5branch protection is not maximal on development and all release branches
Vulnerabilities🟢 91 existing vulnerabilities detected
SAST🟢 8SAST tool detected but not run on all commits
cargo/base64ct 1.8.1 🟢 5.4
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 3Found 8/23 approved changesets -- score normalized to 3
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License⚠️ 0license file not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Fuzzing🟢 10project is fuzzed
Signed-Releases⚠️ -1no releases found
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Vulnerabilities🟢 82 existing vulnerabilities detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
cargo/cc 1.2.49 🟢 6.2
Details
CheckScoreReason
Code-Review🟢 7Found 12/16 approved changesets -- score normalized to 7
Binary-Artifacts🟢 10no binaries found in the repo
Maintained🟢 1030 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Vulnerabilities🟢 100 existing vulnerabilities detected
License🟢 10license file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Fuzzing⚠️ 0project is not fuzzed
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 10security policy file detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
cargo/mio 1.1.1 🟢 6.9
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Binary-Artifacts🟢 10no binaries found in the repo
Maintained🟢 1018 commit(s) and 12 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Vulnerabilities🟢 100 existing vulnerabilities detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
cargo/s3s 0.12.0-rc.5 UnknownUnknown
cargo/toml_edit 0.23.9 🟢 7.2
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 1030 commit(s) and 14 issue activity found in the last 90 days -- score normalized to 10
Code-Review⚠️ 0Found 1/14 approved changesets -- score normalized to 0
Packaging⚠️ -1packaging workflow not detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Signed-Releases⚠️ -1no releases found
Fuzzing🟢 10project is fuzzed
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Vulnerabilities🟢 100 existing vulnerabilities detected
SAST🟢 10SAST tool is run on all commits

Scanned Files

  • .github/workflows/ci.yml
  • Cargo.lock

@houseme
Copy link
Contributor

houseme commented Dec 8, 2025

@copilot Analyze in depth the error prompts in the action, modify and improve the errors, and please start your repair and improvement process as a senior Rust architect.

Copy link
Contributor

Copilot AI commented Dec 8, 2025

@houseme I've opened a new pull request, #1061, to work on those changes. Once the pull request is ready, I'll request review from you.

…ody size limits (#1061)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps the s3s dependency from version 0.12.0-rc.4 to 0.12.0-rc.5, which introduces strongly-typed ETag handling for conditional request headers. The changes adapt the codebase to use the new as_strong() method for ETag validation and implement comprehensive request/response body size limits to prevent DoS attacks through unbounded memory allocation.

Key Changes:

  • Updated ETag conditional header handling (If-Match, If-None-Match) to use strongly-typed ETags with as_strong() validation across GetObject, HeadObject, PutObject, CompleteMultipartUpload, and CopyObject operations
  • Replaced all store_all_unlimited() calls with store_all_limited() using defined size constants (1MB-100MB depending on use case) to prevent memory exhaustion attacks
  • Improved error messages across admin handlers to provide clearer feedback when body size limits are exceeded

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
Cargo.toml Bumped s3s dependency version from 0.12.0-rc.4 to 0.12.0-rc.5
Cargo.lock Updated lock file with new s3s version checksum
rustfs/src/storage/ecfs.rs Updated ETag conditional logic in GetObject, HeadObject, PutObject, CompleteMultipartUpload, and CopyObject to use as_strong() for strong ETag validation
rustfs/src/admin/mod.rs Added constants module import
rustfs/src/admin/constants.rs New file defining request body size limits for admin API endpoints (1MB-100MB)
rustfs/src/admin/rpc.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE limit and improved error message
rustfs/src/admin/handlers.rs Applied size limits to heal and remote target configuration endpoints
rustfs/src/admin/handlers/user.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE and MAX_IAM_IMPORT_SIZE limits
rustfs/src/admin/handlers/tier.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE limit with improved error messages
rustfs/src/admin/handlers/sts.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE limit with improved error messages
rustfs/src/admin/handlers/service_account.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE limit with improved error messages
rustfs/src/admin/handlers/policies.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE limit with improved error message
rustfs/src/admin/handlers/kms_keys.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE limit to KMS key operations
rustfs/src/admin/handlers/kms_dynamic.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE limit to KMS configuration operations
rustfs/src/admin/handlers/kms.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE limit to key generation operations
rustfs/src/admin/handlers/group.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE limit with improved error message
rustfs/src/admin/handlers/event.rs Applied MAX_ADMIN_REQUEST_BODY_SIZE limit to notification target configuration
rustfs/src/admin/handlers/bucket_meta.rs Applied MAX_BUCKET_METADATA_IMPORT_SIZE limit with improved error message
crates/ecstore/src/client/mod.rs Added body_limits module
crates/ecstore/src/client/body_limits.rs New file defining MAX_S3_RESPONSE_SIZE (10MB) for remote S3 service responses
crates/ecstore/src/client/transition_api.rs Applied MAX_S3_RESPONSE_SIZE limit to transition client error responses
crates/ecstore/src/client/bucket_cache.rs Applied MAX_S3_RESPONSE_SIZE limit and removed unused imports
crates/ecstore/src/client/api_list.rs Applied MAX_S3_RESPONSE_SIZE limit to list operations
crates/ecstore/src/client/api_get_object_attributes.rs Applied MAX_S3_RESPONSE_SIZE limit and removed unused imports
crates/ecstore/src/client/api_get_object_acl.rs Applied MAX_S3_RESPONSE_SIZE limit and removed unused imports
docs/security/dos-prevention-body-limits.md New documentation file explaining DoS prevention rationale and implemented limits
Comments suppressed due to low confidence (2)

rustfs/src/admin/handlers/user.rs:84

  • This error message hasn't been updated like the other similar messages in this PR. For consistency with the other admin handler updates (e.g., sts.rs, tier.rs, service_account.rs), this should be updated to a more descriptive message.

Suggested change:

return Err(s3_error!(InvalidRequest, "user configuration body too large or failed to read"));
        let body = match input.store_all_limited(MAX_ADMIN_REQUEST_BODY_SIZE).await {
            Ok(b) => b,
            Err(e) => {
                warn!("get body failed, e: {:?}", e);
                return Err(s3_error!(InvalidRequest, "get body failed"));

crates/ecstore/src/client/bucket_cache.rs:219

  • Multiple .unwrap() calls in the chain can cause panics if any of the operations fail:
  1. store_all_limited().unwrap() - panics if reading body fails or exceeds limit
  2. String::from_utf8().unwrap() - panics if body contains invalid UTF-8
  3. quick_xml::de::from_str().unwrap() - panics if XML parsing fails

This defeats the purpose of adding size limits for DoS prevention, as a malicious or misconfigured remote service could still cause panics.

Suggested fix:

let b = resp.body_mut().store_all_limited(MAX_S3_RESPONSE_SIZE).await.map_err(|e| {
    error!("Failed to read location response body: {:?}", e);
    std::io::Error::other("Failed to read location response")
})?.to_vec();
let mut location = "".to_string();
if tier_type == "huaweicloud" {
    let d = quick_xml::de::from_str::<CreateBucketConfiguration>(&String::from_utf8_lossy(&b))
        .map_err(|e| std::io::Error::other(format!("Failed to parse location response: {}", e)))?;
    location = d.location_constraint;
} else {
    if let Ok(LocationConstraint { field }) = quick_xml::de::from_str::<LocationConstraint>(&String::from_utf8_lossy(&b)) {
        location = field;
    }
}
    let b = resp.body_mut().store_all_limited(MAX_S3_RESPONSE_SIZE).await.unwrap().to_vec();
    let mut location = "".to_string();
    if tier_type == "huaweicloud" {
        let d = quick_xml::de::from_str::<CreateBucketConfiguration>(&String::from_utf8(b).unwrap()).unwrap();
        location = d.location_constraint;
    } else {
        if let Ok(LocationConstraint { field }) = quick_xml::de::from_str::<LocationConstraint>(&String::from_utf8(b).unwrap()) {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants