Skip to content

Comments

Fix #1901: Install system dependencies for lxml in workflow and Docker#2006

Open
7uyash wants to merge 1 commit intoOWASP:masterfrom
7uyash:fix/lxml-dependencies
Open

Fix #1901: Install system dependencies for lxml in workflow and Docker#2006
7uyash wants to merge 1 commit intoOWASP:masterfrom
7uyash:fix/lxml-dependencies

Conversation

@7uyash
Copy link

@7uyash 7uyash commented Feb 12, 2026

This PR fixes issue #1990

I found that publishing-check.yml and the Dockerfile were missing the system libraries required to compile lxml on Ubuntu 24.04.
Changes:

  • Added libxml2-dev and libxslt1-dev to .github/workflows/publishing-check.yml.
  • Added the same dependencies to the Dockerfile.

You're A Rockstar

Thank you for submitting a Pull Request (PR) to the Cheat Sheet Series.

🚩 If your PR is related to grammar/typo mistakes, please double-check the file for other mistakes in order to fix all the issues in the current cheat sheet.

Please make sure that for your contribution:

  • In case of a new Cheat Sheet, you have used the Cheat Sheet template.
  • All the markdown files do not raise any validation policy violation, see the policy.
  • All the markdown files follow these format rules.
  • All your assets are stored in the assets folder.
  • All the images used are in the PNG format.
  • Any references to websites have been formatted as [TEXT](URL)
  • You verified/tested the effectiveness of your contribution (e.g., the defensive code proposed is really an effective remediation? Please verify it works!).
  • The CI build of your PR pass, see the build status here.

If your PR is related to an issue, please finish your PR text with the following line:

This PR fixes issue #1990 .

AI Tool Usage Disclosure (required for all PRs)

Please select one of the following options:

  • I have NOT used any AI tool to generate the contents of this PR.
  • I have used AI tools to generate the contents of this PR. I have verified
    the contents and I affirm the results. The LLM used is [llm name and version]
    and the prompt used is [your prompt here]. [Feel free to add more details if needed]

Thank you again for your contribution 😃

7uyash referenced this pull request Feb 12, 2026
- Add step to install libxml2-dev and libxslt1-dev before Python dependencies
- Required for building lxml==5.3.0 from source
- Fixes 'Error: Please make sure the libxml2 and libxslt development packages are installed'
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses missing system dependencies required to compile lxml on Ubuntu 24.04 by adding necessary build libraries to both the GitHub Actions workflow and Dockerfile. The lxml package (version 5.3.0 in requirements.txt) requires libxml2-dev and libxslt1-dev for compilation, which were missing in the publishing-check workflow but already present in build-and-deploy-website workflow.

Changes:

  • Added libxml2-dev and libxslt1-dev system dependencies to publishing-check.yml workflow
  • Added build dependencies (build-essential, gcc, libxml2-dev, libxslt1-dev, zlib1g-dev) to Dockerfile with proper cleanup

Reviewed changes

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

File Description
.github/workflows/publishing-check.yml Added system dependencies installation step for lxml before Python dependencies
Dockerfile Added build toolchain and XML/XSLT development libraries with apt cache cleanup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +19 to +20
- name: Install system dependencies for lxml
run: sudo apt-get update && sudo apt-get install -y libxml2-dev libxslt1-dev
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The PR title references issue #1901, but the description and commits reference issue #1990. Please verify which is the correct issue number and update the title accordingly to ensure proper issue tracking and linking.

Copilot uses AI. Check for mistakes.

RUN apt-get update && apt-get install -y \
build-essential \
gcc \
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The Dockerfile includes gcc explicitly on line 6, but gcc is already included in the build-essential package on line 5. This creates redundancy. Consider removing the explicit gcc line since it's already provided by build-essential.

Suggested change
gcc \

Copilot uses AI. Check for mistakes.
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