mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-17 12:09:27 +00:00
feat(propose-adjudicate-prove): overlay adjudicates inventory before prove
Regex inventory stays the proposer. MAP attaches promote/demote/unadjudicated/coverage from intra-file taint (tree-sitter when a grammar parses, Python ast as last resort). Deep sandboxes promotions only, ordered by the existing heuristic ranker plus optional OpenRouter mechanism recall. The SAST pair slice scores overlay outcomes; the stage-1 detection gate and local pair gate stay inventory-only.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package cn.hutool.core.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Enumeration;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
/**
|
||||
* Excerpt of hutool ZipUtil.unzip after CVE-2018-17297 (Zip Slip / CWE-22).
|
||||
* https://github.com/dromara/hutool/commit/8d7d0b7fb5ea4f7447b40131bffc1ec506a6528e
|
||||
*/
|
||||
public class ZipUtil {
|
||||
public static File unzip(File zipFile, File outFile, Charset charset) throws Exception {
|
||||
ZipFile zipFileObj = new ZipFile(zipFile, charset);
|
||||
Enumeration<? extends ZipEntry> em = zipFileObj.entries();
|
||||
while (em.hasMoreElements()) {
|
||||
ZipEntry zipEntry = em.nextElement();
|
||||
File outItemFile = FileUtil.file(outFile, zipEntry.getName());
|
||||
if (zipEntry.isDirectory()) {
|
||||
outItemFile.mkdirs();
|
||||
}
|
||||
}
|
||||
zipFileObj.close();
|
||||
return outFile;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user