Skip to content

fix(execpolicy): normalize repeated path separators#311

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-execpolicy-triple-slash-paths
Open

fix(execpolicy): normalize repeated path separators#311
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-execpolicy-triple-slash-paths

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • fully collapse repeated path separators in execpolicy path normalization
  • normalize Windows separators before sensitive path comparison
  • add regression tests for ///etc/shadow, ////etc/passwd, and multi-slash sensitive path policy decisions

Fixes PlatformNetwork/bounty-challenge#53132.

Validation

  • cargo +1.90.0 fmt --package cortex-execpolicy --check
  • cargo +1.90.0 test -p cortex-execpolicy test_normalize_path_collapses_repeated_slashes
  • cargo +1.90.0 test -p cortex-execpolicy test_multi_slash_sensitive_paths_denied
  • cargo +1.90.0 test -p cortex-execpolicy
  • git diff --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method 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

1 participant