target / strelka

Real-time, container-based file scanning at enterprise scale
Other
877 stars 113 forks source link

ScanZip Improvements - Limits Changes, Zero File Size Support, Encryption Updates #429

Closed ryanohoro closed 9 months ago

ryanohoro commented 9 months ago

Describe the change

Adds to ScanZip:

New configuration options:

        size_limit: 250000000
        limit_metadata: True
        crack_pws: False
        log_pws: True

New flags:

Describe testing procedures

Successfully built backend image with new and existing tests.

Sample output

{
    "elapsed": 0.394,
    "flags": [],
    "total": {
        "files": 2,
        "extracted": 1
    },
    "files": [{
            "file_name": "test_empty.bin",
            "file_size": 0,
            "compression_size": 0,
            "compression_rate": 0,
            "extracted": false,
            "encrypted": false,
        }, {
            "file_name": "test.txt",
            "file_size": 4007,
            "compression_size": 1449,
            "compression_rate": 63.84,
            "extracted": true,
            "encrypted": false,
        },
    ],
    "compression_rate": 63.84,
}

Checklist

phutelmyer commented 9 months ago

Oh I love this. I'll give this a test today. Great work!

@ryanohoro style check failed. I can clean that up if you'd like.

phutelmyer commented 9 months ago

Cleaned up the styling (@ryanohoro black 24.x comes with a few changes)

Tested this locally and everything looks great. Much better output + functionality, thank you :)