Skip to content

fix(config): require non-empty absolute paths for ldconfig - #2225

Open
b1scu1td3stroy3r wants to merge 1 commit into
NVIDIA:mainfrom
b1scu1td3stroy3r:fix/validate-ldconfig-path
Open

b1scu1td3stroy3r wants to merge 1 commit into
NVIDIA:mainfrom
b1scu1td3stroy3r:fix/validate-ldconfig-path

Conversation

@b1scu1td3stroy3r

Copy link
Copy Markdown

Issue

N/A — proactive config validation hardening for nvidia-container-cli.ldconfig.

Description

Tightens ldconfigPath.assertValid() in api/config/v1 to reject empty or relative paths:

  • Rejects empty nvidia-container-cli.ldconfig values ("").
  • Requires host-relative paths (@<path>) to specify an absolute path after the @ prefix, rejecting bare "@" and relative paths such as "@sbin/ldconfig".
  • Requires container-relative paths (when features.allow-ldconfig-from-container = true) to specify an absolute path starting with /.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Unit tests passing (make test)
  • Lint checks passing (make lint)
  • Test cases are added for new code paths
  • Commits are signed-off and cryptographically signed

Testing

Added table-driven unit test cases in TestAssertValid (api/config/v1/config_test.go) covering empty, bare @, non-absolute host, and non-absolute container ldconfig values. Relying on GitHub Actions CI for Linux make test and make lint verification.

Signed-off-by: b1scu1td3stroy3r <terrywhite2025@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 15, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant