fix(security): 2 improvements across 2 files#2053
Conversation
- Security: Insecure YAML deserialization (yaml.load without Loader) - Security: Use of insecure HTTP URLs for external resources Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Security: Insecure YAML deserialization (yaml.load without Loader) - Security: Use of insecure HTTP URLs for external resources Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
|
@tomaioo please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit ed1bf5f: ✅ Validation status: passed
For more details, please refer to the build report. |
Summary
fix(security): 2 improvements across 2 files
Problem
Severity:
High| File:ci_scripts/postprocess_toc_yml.py:L25The code uses yaml.load(stream) without specifying a Loader parameter. Starting from PyYAML 5.1, this is deprecated and can be a security vulnerability if the YAML file contains malicious content. An attacker who can control the toc.yml file could execute arbitrary code via YAML deserialization.
Solution
Use yaml.safe_load() instead of yaml.load() or specify a safe Loader: yaml.load(stream, Loader=yaml.SafeLoader)
Changes
ci_scripts/postprocess_toc_yml.py(modified)ci_scripts/generate_xrefmap.py(modified)