Skip to content

fix(security): allow C++ source files in Private directories - #13426

Open
SuparvaCode wants to merge 2 commits into
continuedev:mainfrom
SuparvaCode:fix/unreal-private-directory-security-filter
Open

SuparvaCode wants to merge 2 commits into
continuedev:mainfrom
SuparvaCode:fix/unreal-private-directory-security-filter

Conversation

@SuparvaCode

Copy link
Copy Markdown

Description

In Unreal Engine C++ modules (and standard modular C++ projects), code is organized into Public/ (headers) and Private/ (implementation .cpp and internal headers).

Because DEFAULT_SECURITY_IGNORE_DIRS contains 'private/', isSecurityConcern was previously flagging ordinary C++ implementation files like Source//Private/ExampleActor.cpp as security concerns, preventing Agent mode from reading or editing them.

This change:

  • Allows C++ and source files (.cpp, .cc, .cxx, .c, .h, .hpp, .hxx, .inl, .cs) located in Source//Private/ or Private/ directories, unless they match security-sensitive file patterns (like .key, .pem, .env).
  • Adds unit tests covering Unreal Engine module paths and nested Private directories while ensuring secret files remain blocked.

Resolves #13420

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Tests

Added test cases to core/indexing/ignore.vitest.ts:

  • Verified Source/ExampleModule/Private/ExampleActor.cpp, .h, and nested subdirectories return false.
  • Verified absolute workspace paths like c:/Users/name/Documents/.../Private/ExampleActor.cpp return false.
  • Verified sensitive files like Source/.../Private/secret.key and Private/.env continue to return true.

@SuparvaCode
SuparvaCode requested a review from a team as a code owner October 25, 2026 18:37
@SuparvaCode
SuparvaCode requested review from sestinj and removed request for a team October 25, 2026 18:37
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@SuparvaCode

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

This branch has not been deployed

No deployments
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.

Standard Unreal Engine C++ Private directories incorrectly blocked by security filter

1 participant