Skip to content

fix: SFI issue fix#390

Merged
Prajwal-Microsoft merged 5 commits into
devfrom
sfi-issue-fix
Aug 22, 2025
Merged

fix: SFI issue fix#390
Prajwal-Microsoft merged 5 commits into
devfrom
sfi-issue-fix

Conversation

@Ravikirana-Microsoft

Copy link
Copy Markdown
Contributor

Purpose

This pull request enhances the security and robustness of the static file serving logic in src/frontend/frontend_server.py. The main improvements include adding protections against directory traversal, blocking access to sensitive files, and introducing security headers for all responses.

Security enhancements for static file serving:

  • Implemented path resolution checks to prevent directory traversal attacks when serving files from the build directory.
  • Added checks to block serving dotfiles and files with sensitive extensions or names, such as .env, .py, .pem, and Dockerfile. [1] [2]

HTTP response security improvements:

  • Introduced middleware to add basic security headers (X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy) to all responses.
  • Ensured that suspicious or invalid file requests return a generic 404 error to prevent information leakage.

Codebase improvements:

  • Refactored imports to support new security logic and file path handling.

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Comment thread src/frontend/frontend_server.py Fixed
Comment thread src/frontend/frontend_server.py Fixed
Comment thread src/frontend/frontend_server.py Fixed
@Prajwal-Microsoft Prajwal-Microsoft merged commit ffcfa86 into dev Aug 22, 2025
8 checks passed
@Ravikirana-Microsoft Ravikirana-Microsoft deleted the sfi-issue-fix branch September 10, 2025 07:24
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

deepammi pushed a commit to deepammi/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator that referenced this pull request Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants