False negative: unzip using subprocess or `shutil.unpack_archive` is not covered in py/tarslip

未关闭
#21,712 0 条评论 1 个 reaction 已指派 2 人 在 GitHub 查看

@hvitved 已经在做这个了。

开始于 2026年4月16日。

  • #21720 来自 @copilot-swe-agent —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

The rule currently misses standard library functions and patterns that perform archive extraction, such as shutil.unpack_archive and system tar commands invoked via subprocess.

https://github.com/positive666/yolo_research/blob/f5795f27a56ca4dbe4c182e12f61309a52e23967/utils/downloads.py#L173
https://github.com/JohnClema/xffl/blob/a920300239a82a85a87d0bf25735762844ee8e9d/aggregator/aggregation.py#L9

Here is a minimal, simplified code example to reproduce:

 import tarfile, sys, shutil, zipfile, subprocess
 unsafe_filename = sys.argv[1]
 tar = tarfile.open(unsafe_filename) 
 tar.extractall() # detected
 # 1. shutil 
 shutil.unpack_archive(unsafe_filename, "out") # not detected
 # 2. subprocess
 subprocess.run(["tar", "-xf", unsafe_filename]) # not detected
主要语言
CodeQL
星标
10.1k
派生
2.1k
平均合并
2 天 10 小时
30 天内合并 PR
134

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/codeql 的其他 Issue

查看 github/codeql 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。