Skip to content

Bump testcontainers from 0.27.3 to 0.28.0 - #481

Open
dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/cargo/testcontainers-0.28.0
Open

Bump testcontainers from 0.27.3 to 0.28.0#481
dependabot[bot] wants to merge 2 commits into
mainfrom
dependabot/cargo/testcontainers-0.28.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 18, 2026

Copy link
Copy Markdown
Contributor

Bumps testcontainers from 0.27.3 to 0.28.0.

Release notes

Sourced from testcontainers's releases.

v0.28.0

Details

Miscellaneous Tasks

  • Update astral-tokio-tar from 0.6.0 to 0.6.1 (#940)
  • Update parse-display requirement from 0.9.0 to 0.11.0 (#942)
  • Bump testcontainers/sshd image from 1.3.0 to 1.4.0 (#952)
  • Update russh requirement from 0.60.0 to 0.61.2 (#950)
  • [❗] Update bollard 0.20 to 0.21 (#943)
  • Update docker-compose-types requirement from 0.23 to 0.24 (#951)
Changelog

Sourced from testcontainers's changelog.

[0.28.0] - 2026-08-06

Details

Miscellaneous Tasks

  • Update astral-tokio-tar from 0.6.0 to 0.6.1 (#940)
  • Update parse-display requirement from 0.9.0 to 0.11.0 (#942)
  • Bump testcontainers/sshd image from 1.3.0 to 1.4.0 (#952)
  • Update russh requirement from 0.60.0 to 0.61.2 (#950)
  • [❗] Update bollard 0.20 to 0.21 (#943)
  • Update docker-compose-types requirement from 0.23 to 0.24 (#951)
Commits
  • 59792c3 chore: release v0.28.0 (#964)
  • 5331a2a docs(site): add missing languages and reorder docs navigation (#955)
  • 7d8f95a ci(deps): bump actions/checkout from 6 to 7 (#953)
  • 936a3b6 chore(deps): update docker-compose-types requirement from 0.23 to 0.24 (#951)
  • 7588345 chore(deps)!: update bollard 0.20 to 0.21 (#943)
  • b06dd31 chore(deps): update russh requirement from 0.60.0 to 0.61.2 (#950)
  • 24027d4 chore: bump testcontainers/sshd image from 1.3.0 to 1.4.0 (#952)
  • 3067fcd chore(deps): update parse-display requirement from 0.9.0 to 0.11.0 (#942)
  • 5632380 chore(deps): update astral-tokio-tar from 0.6.0 to 0.6.1 (#940)
  • See full diff 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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [testcontainers](https://github.com/testcontainers/testcontainers-rs) from 0.27.3 to 0.28.0.
- [Release notes](https://github.com/testcontainers/testcontainers-rs/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-rs/blob/main/CHANGELOG.md)
- [Commits](testcontainers/testcontainers-rs@0.27.3...0.28.0)

---
updated-dependencies:
- dependency-name: testcontainers
  dependency-version: 0.28.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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 Aug 18, 2026
@mickgmdb
mickgmdb force-pushed the dependabot/cargo/testcontainers-0.28.0 branch from f9e29f3 to eba6707 Compare August 23, 2026 07:08
Comment thread src/access_map/aws.rs
use aws_sdk_ec2::Client as Ec2Client;
use aws_sdk_ecr::Client as EcrClient;
use aws_sdk_iam::{Client as IamClient, error::SdkError};
use aws_sdk_kms::Client as KmsClient;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Semgrep identified an issue in your code:
Rust KMS, HSM, or PKCS#11 provider used. Record provider, key identifier, key origin, storage, and access-control boundary.

To resolve this comment:

✨ Commit fix suggestion
  1. Confirm that KmsClient is required. If the application does not call AWS KMS, remove use aws_sdk_kms::Client as KmsClient;.
  2. Record the KMS provider as AWS Key Management Service (AWS KMS) and document the AWS account and region used by the client.
  3. Record the exact key identifier used by each KMS operation, such as a key ARN or alias. Keep identifiers in configuration rather than hardcoding them in source code.
  4. Record the key origin and storage, including whether the key is AWS-owned, AWS-managed, customer-managed, or uses imported or external key material. Document that AWS KMS stores and protects the key material.
  5. Restrict the IAM role or user used by this client to only the required KMS actions, such as kms:Encrypt, kms:Decrypt, or kms:GenerateDataKey, and limit each action to the required key ARN.
  6. Review the KMS key policy and document the access-control boundary, including the AWS account, IAM principals, workload identity, and any VPC endpoint or organizational restrictions that control access.
  7. Load the key identifier and AWS configuration from approved environment variables or a secrets/configuration manager, for example KMS_KEY_ARN, and reject startup when the required value is missing or points to an unexpected account or region.
💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by crypto-inventory-rust-key-management-provider-use.

🛟 Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

You can view more details about this finding in the Semgrep AppSec Platform.

Comment on lines +23 to +25
Client::builder()
.redirect(Policy::none())
.danger_accept_invalid_certs(true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Semgrep identified an issue in your code:

LAX_CLIENT disables TLS certificate verification, allowing man‑in‑the‑middle to intercept and alter HTTPS requests made via get_client(true). Any self‑signed or forged certificate will be accepted, exposing tokens and data.

More details about this

The LAX_CLIENT is built with danger_accept_invalid_certs(true), which disables TLS certificate verification for every request made through this client. Any HTTPS connection made via get_client(true) can silently accept self‑signed or forged certificates, enabling interception and tampering.

How this can be exploited

  • Attacker on the same network runs a TLS‑terminating proxy with a bogus cert:
    • Example: mitmproxy -p 443 (auto‑generates a self‑signed cert) or openssl req -x509 -newkey rsa:2048 -keyout k.pem -out c.pem -days 1 -nodes && sudo openssl s_server -accept 443 -cert c.pem -key k.pem -www.
  • They redirect traffic for the target host to their machine (e.g., ARP/DNS spoofing so api.example.com → attacker IP).
  • Your code calls let client = get_client(true); and then client.get(Url::parse("https://api.example.com/user").unwrap())....
  • Because LAX_CLIENT accepts any cert, the TLS handshake with the attacker’s fake server succeeds.
  • The attacker reads sensitive headers (e.g., Authorization: Bearer ) and returns altered JSON, causing data theft or logic manipulation while appearing as a successful HTTPS request.

Affected code

  • In the LAX_CLIENT static initializer: Client::builder().redirect(Policy::none()).danger_accept_invalid_certs(true) makes all requests via LAX_CLIENT trust any certificate.

To resolve this comment:

✨ Commit fix suggestion
  1. Change .danger_accept_invalid_certs(true) to .danger_accept_invalid_certs(false) in the LAX_CLIENT and any other client builders.
  2. Ensure that the .danger_accept_invalid_hostnames(true) call is not present, or is set to false if it is needed.
  3. Only set these options to true if you have a strong justification (such as for local testing environments or explicit documentation that security is intentionally reduced).

Setting .danger_accept_invalid_certs(false) ensures that your HTTP client verifies server TLS certificates, preventing potential man-in-the-middle attacks.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by reqwest-accept-invalid.

🛟 Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

You can view more details about this finding in the Semgrep AppSec Platform.

Comment thread src/validation.rs
Comment on lines +214 to +215
let lax = Client::builder()
.danger_accept_invalid_certs(true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Semgrep identified an issue in your code:

Client built with danger_accept_invalid_certs(true) skips TLS chain validation, enabling MITM with a self‑signed cert matching the hostname.

More details about this

The lax HTTP client is built with Client::builder().danger_accept_invalid_certs(true), which disables TLS certificate validation. Any HTTPS request made with this client will accept a self‑signed or forged certificate, allowing an active network attacker to intercept and alter traffic.

Concrete exploit tied to this code:

  • Attacker generates a self‑signed cert whose CN/SAN = the target host (e.g., api.example.com) and sets up a Wi‑Fi hotspot/transparent proxy.
  • Your code calls ValidationClients::new(...), creating lax with danger_accept_invalid_certs(true), and client_for_rule(...) returns &self.lax when global_mode is Off or Lax and a rule opts into lax.
  • When the app sends requests via lax, it accepts the attacker’s self‑signed cert and establishes HTTPS anyway.
  • The attacker reads/modifies requests and responses (e.g., steals Authorization headers, session cookies, or injects malicious data), since the chain is not verified.

This behavior enables man‑in‑the‑middle attacks wherever lax is selected, even if the hostname matches, because the certificate trust chain is not checked.

To resolve this comment:

✨ Commit fix suggestion
  1. Change the line let lax = Client::builder().danger_accept_invalid_certs(true).timeout(timeout).build()?; to let lax = Client::builder().danger_accept_invalid_certs(false).timeout(timeout).build()?; so that client does not accept invalid certificates.
  2. Review the logic that makes use of the lax client to determine if it is strictly necessary to disable certificate validation for any use case. Only allow invalid certificates if there is no other option, and after a risk assessment.
  3. Alternatively, if you must allow invalid certs for legacy or specific non-production testing, document the usage clearly in code comments and ensure this mode cannot be used in production.
  4. Remove .danger_accept_invalid_hostnames(true) or .danger_accept_invalid_certs(true) anywhere they are set to true. Only set these to true when you fully understand and accept the risks.

Allowing invalid certificates exposes users to man-in-the-middle attacks, so this should be avoided unless absolutely necessary for testing in isolated, trusted environments.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by reqwest-accept-invalid.

🛟 Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

You can view more details about this finding in the Semgrep AppSec Platform.

@semgrep-code-mongodb

Copy link
Copy Markdown

Semgrep found 9 crypto-inventory-rust-tls-configuration findings:

Rust TLS configuration operation. Record crypto provider, protocol versions, endpoint role, peer, trust source, and deployment scope.

🛟 Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

Semgrep found 40 crypto-inventory-rust-crypto-library-use findings:

Rust cryptographic, TLS, SSH, WireGuard, PKCS#11, or KMS crate used. Correlate with reachable operations before treating it as active use.

🛟 Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

Semgrep found 31 crypto-inventory-rust-crate-qualified-primitive findings:

Rust cryptographic operation sha::clone. Record algorithm parameters, key size, nonce handling, inputs, and caller purpose.

🛟 Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

Semgrep found 8 tainted-path findings:

The application builds a file path from potentially untrusted data, which can lead to a path traversal vulnerability. An attacker can manipulate the path which the application uses to access files. If the application does not validate user input and sanitize file paths, sensitive files such as configuration or user data can be accessed, potentially creating or overwriting files. To prevent this vulnerability, validate and sanitize any input that is used to create references to file paths. Also, enforce strict file access controls. For example, choose privileges allowing public-facing applications to access only the required files.

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>src/scanner/docker.rs</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0["<a href=https://github.com/mongodb/kingfisher/blob/eba670703587bb8e97fa0c16b506c027da071e90/src/scanner/docker.rs#L210 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 210] out_dir</a>"]
        end
        %% Intermediate

        subgraph Traces0[Traces]
            direction TB

            v2["<a href=https://github.com/mongodb/kingfisher/blob/eba670703587bb8e97fa0c16b506c027da071e90/src/scanner/docker.rs#L210 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 210] blob_path_from_digest</a>"]

            v3["<a href=https://github.com/mongodb/kingfisher/blob/eba670703587bb8e97fa0c16b506c027da071e90/src/scanner/docker.rs#L167 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 167] out_dir</a>"]

            v4["<a href=https://github.com/mongodb/kingfisher/blob/eba670703587bb8e97fa0c16b506c027da071e90/src/scanner/docker.rs#L210 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 210] path</a>"]
        end
            v2 --> v3
            v3 --> v4
        %% Sink

        subgraph Sink
            direction LR

            v1["<a href=https://github.com/mongodb/kingfisher/blob/eba670703587bb8e97fa0c16b506c027da071e90/src/scanner/docker.rs#L215 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 215] &path</a>"]
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    Traces0:::invis
    File0:::invis

    %% Connections

    Source --> Traces0
    Traces0 --> Sink

Loading

🛟 Help? Slack #semgrep-help or go/semgrep-help.

Resolution Options:

  • Fix the code
  • Reply /fp $reason (if security gap doesn’t exist)
  • Reply /ar $reason (if gap is valid but intentional; add mitigations/monitoring)
  • Reply /other $reason (e.g., test-only)

@mickgmdb
mickgmdb force-pushed the dependabot/cargo/testcontainers-0.28.0 branch from eba6707 to f9e29f3 Compare August 23, 2026 07:16
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.

1 participant