I/O & Encoding

PyImghdr

Python stdlib module — imghdr. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.test()Neutral
#
Signature
test()

test function.

.test_bmp()Neutral
#
Signature
test_bmp(h, f)

test_bmp function.

.test_exr()Neutral
#
Signature
test_exr(h, f)

test_exr function.

.test_gif()Neutral
#
Signature
test_gif(h, f)

GIF ('87 and '89 variants)

.test_jpeg()Neutral
#
Signature
test_jpeg(h, f)

JPEG data with JFIF or Exif markers; and raw JPEG

.test_pbm()Neutral
#
Signature
test_pbm(h, f)

PBM (portable bitmap)

.test_pgm()Neutral
#
Signature
test_pgm(h, f)

PGM (portable graymap)

.test_png()Neutral
#
Signature
test_png(h, f)

test_png function.

.test_ppm()Neutral
#
Signature
test_ppm(h, f)

PPM (portable pixmap)

.test_rast()Neutral
#
Signature
test_rast(h, f)

Sun raster file

Fully-Qualified Names

FQNField
imghdrfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
import imghdr