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 摘要。