Skip to content

Add: iccDLL Server Defense-in-Depth#787

Merged
xsscx merged 2 commits intomasterfrom
dll-server-hardening
Apr 6, 2026
Merged

Add: iccDLL Server Defense-in-Depth#787
xsscx merged 2 commits intomasterfrom
dll-server-hardening

Conversation

@xsscx
Copy link
Copy Markdown
Member

@xsscx xsscx commented Apr 6, 2026

Pull Request Checklist

#784

  • Have you followed the guidelines in Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you built your Pull Request locally with the Build Instructions?
  • Have you added or updated relevant tests?
  • Have you added or updated relevant docs?

…, and CI improvements

Separation of concerns:
- Extract IccIsapiSanitize.h/.cpp — sanitization primitives (HtmlEscape,
  JsonEscape, SanitizeFilename, SanitizeUri, UrlDecode, SanitizeErrorMessage)
- Extract IccIsapiHttp.h/.cpp — HTTP response layer with 7 security headers
  (CSP, X-Frame-Options, X-Content-Type-Options, X-XSS-Protection,
  Cache-Control, Referrer-Policy, Content-Length)
- Refactor iccIisIsapi.cpp to use extracted modules

Security hardening:
- UrlDecode: replace std::stoi() with manual hex conversion (CWE-248)
- SanitizeErrorMessage: scrub all path patterns from error output (CWE-209)
- BuildPlainTextBody: replace fixed buffer with ostringstream
- BuildToolSuiteResponse: add workspace cleanup in catch block (CWE-789)
- Add SanitizeUri() for URI path sanitization
- Add sanitize.js for client-side DOM-XSS prevention
- Add format=json endpoint returning valid JSON

Testing and tooling:
- IccIsapiFuzzTest.cpp — fuzz test harness (54,055 checks, 0 failures)
- Stress-IccIisIsapi.ps1 — concurrent stress test (1,762 RPS)
- Uninstall-IccIisIsapiSite.ps1 — clean IIS teardown
- Export/Import-IccIisIsapiSite.ps1 — deployment packaging

CI workflow fix:
- ci-pr-risk-security-analysis.yml Check 7: broaden write permission
  detection to all scopes (packages, pull-requests, issues, actions,
  security-events) in both Linux and Windows audit jobs

Documentation: Updated AGENTS.md, copilot-instructions.md, Readme.md,
isapi-instructions.md with ISAPI architecture and deployment guides.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@xsscx xsscx self-assigned this Apr 6, 2026
@xsscx xsscx requested review from ChrisCoxArt and dwtza as code owners April 6, 2026 16:44
@xsscx xsscx added PR Pull Request Merge Ready Maintainer indicates Merge Ready labels Apr 6, 2026
@xsscx xsscx removed the request for review from dwtza April 6, 2026 16:44
@xsscx xsscx linked an issue Apr 6, 2026 that may be closed by this pull request
@xsscx xsscx added Pending Merge Maintainer indicates Merge Pending and Requests No Further Changes and removed Merge Ready Maintainer indicates Merge Ready pending labels Apr 6, 2026
…tics

- sanitize-sed.sh v4: detect_hidden_chars() (8 categories), validate_ref()
- sanitize.ps1 v4: Detect-HiddenChars, Validate-Ref (PowerShell parity)
- ci-pr-risk-security-analysis.yml: Section 6 table output, Section 10
  canary check (PR #786 BOM pattern), emit_ref_finding() with hex dump
- ci-pr-action.yml: ref validation using detect_hidden_chars
- test_sanitization.sh: version v3->v4 fix, grep pipefail guard

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@xsscx xsscx merged commit a4f326b into master Apr 6, 2026
1 check passed
@xsscx xsscx removed Pending Merge Maintainer indicates Merge Pending and Requests No Further Changes pending labels Apr 6, 2026
@xsscx xsscx deleted the dll-server-hardening branch April 7, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR Pull Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add: iccDLL Server Defense-in-Depth

2 participants