Skip to content

Conversation

@shebinleo
Copy link
Owner

Changes

  1. Path Traversal: In PDFBoxWrapper.js and TikaWrapper.js, the filepath is not sanitized before being passed to the java command. This could allow an attacker to read arbitrary files by providing a malicious path.
  2. Potential XSS: In HTMLParser.js, the extractPages function uses $page.html() to extract HTML content, which could lead to XSS if the PDF contains malicious HTML.
  3. Outdated Dependency: The brace-expansion package is outdated and has a low-severity
    vulnerability.

@github-actions
Copy link

github-actions bot commented Jul 5, 2025

Coverage after merging xss-protection-and-temp-dir-usage-dependency-fixes into main will be

97.27%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
index.js100%100%100%100%
lib
   CommandExecutor.js84.21%57.14%83.33%92%10, 28, 34–35, 38
   FileManager.js95.45%94.12%71.43%100%42
   HTMLParser.js94.44%66.67%100%100%13
   ImageProcessor.js83.33%100%100%80%16
   PDFBoxWrapper.js91.43%100%83.33%92.59%53–54
   PDFProcessor.js98.51%94.12%100%100%82
   TikaWrapper.js100%100%100%100%
   config.js100%100%100%100%
   errors.js100%100%100%100%

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 5, 2025

@github-actions
Copy link

github-actions bot commented Jul 5, 2025

Coverage after merging xss-protection-and-temp-dir-usage-dependency-fixes into main will be

97.27%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
index.js100%100%100%100%
lib
   CommandExecutor.js84.21%57.14%83.33%92%10, 28, 34–35, 38
   FileManager.js95.45%94.12%71.43%100%42
   HTMLParser.js94.44%66.67%100%100%13
   ImageProcessor.js83.33%100%100%80%16
   PDFBoxWrapper.js91.43%100%83.33%92.59%53–54
   PDFProcessor.js98.51%94.12%100%100%82
   TikaWrapper.js100%100%100%100%
   config.js100%100%100%100%
   errors.js100%100%100%100%

@shebinleo shebinleo merged commit 36a97b4 into main Jul 5, 2025
5 checks passed
@shebinleo shebinleo deleted the xss-protection-and-temp-dir-usage-dependency-fixes branch July 5, 2025 06:06
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.

2 participants