Skip to content

Fixes docs for directoryBrowse enabled examples - #22419

Open
jzabroski wants to merge 5 commits into
github:mainfrom
jzabroski:patch-1
Open

Fixes docs for directoryBrowse enabled examples#22419
jzabroski wants to merge 5 commits into
github:mainfrom
jzabroski:patch-1

Conversation

@jzabroski

Copy link
Copy Markdown

Fixes #22418

@jzabroski
jzabroski requested a review from a team as a code owner August 24, 2026 22:39
Copilot AI balanced review requested due to automatic review settings August 24, 2026 22:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Corrects the IIS directoryBrowse attribute documentation for issue #22418.

Changes:

  • Replaces enable with enabled in examples and guidance.
  • Updates the reference to Microsoft Learn.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
Web.config.good Corrects the disabled configuration example.
Web.config.bad Corrects the enabled configuration example.
ASPNetDirectoryListing.qhelp Updates guidance and reference documentation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread csharp/ql/src/Security Features/CWE-548/Web.config.bad Outdated
Comment thread csharp/ql/src/Security Features/CWE-548/Web.config.good Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@jzabroski jzabroski left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fix closing tag

@redsun82 redsun82 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Many thanks!

@github-actions

Copy link
Copy Markdown
Contributor

QHelp previews:

csharp/ql/src/Security Features/CWE-548/ASPNetDirectoryListing.qhelp

ASP.NET config file enables directory browsing

ASP.NET applications that enable directory browsing can leak sensitive information to an attacker. The precise nature of the vulnerability depends on which files are listed and accessible.

Recommendation

If this configuration may be used in production, remove the directoryBrowse element from the Web.config file or set the value to false.

Example

The following example shows the directoryBrowse enabled attribute set to true in a Web.config file for ASP.NET:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.webServer>
    <directoryBrowse enabled="true"/>
   ...
  </system.webServer>
</configuration>

To fix this problem, the enabled attribute should be set to false, or the directoryBrowse element should be removed completely:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.webServer>
    <directoryBrowse enabled="false"/>
   ...
  </system.webServer>
</configuration>

References

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Documentation incorrect for 'ASP.NET config file enables directory browsing'

3 participants