{"schemaVersion":1,"resourceType":"connector","slug":"pe","name":"PE executables","catalog":"pe","description":"Inspect PE, ELF and Mach-O executables for malware triage without ever running them","language":"Python","categories":["security"],"repository":"https://github.com/Query-farm/vgi-pe","license":"MIT","generatedAt":"2026-12-01T18:22:16+00:00","runtime":{"engineVersion":"2.0.1","protocolVersion":"3.4"},"release":{"tag":"v0.5.0","publishedAt":"2026-11-25T06:24:59Z","url":"https://github.com/Query-farm/vgi-pe/releases/tag/v0.5.0"},"links":{"html":"https://query.farm/products/orchard/connectors/pe/","llms":"https://query.farm/products/orchard/connectors/pe/llms.txt","markdown":"https://query.farm/products/orchard/connectors/pe/index.md","json":"https://query.farm/products/orchard/api/v1/connectors/pe.json","objects":"https://query.farm/products/orchard/api/v1/connectors/pe/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=pe&q={query}"},"authentication":{"mode":"none_declared","guidance":"No service credentials are declared by this connector. Individual datasets, input files or deployments may have their own prerequisites.","interpretation":"Secret parameter required flags describe the upstream declaration; they do not override the service-level mode above. Keep secrets in environment variables or the deployment secret store. SQL values in angle brackets are placeholders, not automatic environment lookups. Native DuckDB and Haybarn 2.0.1 do not provide a SQL getenv() function, even when worker-supplied snippets mention it. Read environment variables in your application and pass credential values through client parameter bindings (for example, Python con.execute(\"CREATE SECRET stripe (TYPE stripe, api_key ?)\", [os.environ[\"STRIPE_API_KEY\"]]) after attaching the connector. Omit unused optional parameters and keep real values out of saved SQL and logs.","secrets":[]},"deployment":{"local":{"methods":[{"id":"uvx","label":"uvx","icon":"simple-icons:python","steps":[{"title":"Attach with uvx","description":"Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.","lang":"sql","code":"ATTACH 'pe' AS pe (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-pe@v0.5.0 vgi-pe-worker'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'pe' AS pe (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-pe:0.5.0'\n);"}]}],"pinnedMethods":[{"id":"uvx","label":"uvx","icon":"simple-icons:python","steps":[{"title":"Attach with uvx","description":"Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.","lang":"sql","code":"ATTACH 'pe' AS pe (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-pe@v0.5.0 vgi-pe-worker'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'pe' AS pe (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-pe:0.5.0'\n);"}]}]},"selfHost":{"instructions":"https://github.com/Query-farm/vgi-pe","connectionGuide":"https://query.farm/vgi/connect-to-a-worker/","guidance":"Deploy using the connector repository instructions and use its supported HTTP or SSH transport. Replace example URLs with your actual deployment; configure its authentication."},"queryFarm":{"available":true,"console":"https://auth.queryfarm.cloud/console/new?worker=pe","organizationMonthlyMinimumUsd":10,"pricing":"https://query.farm/products/orchard/hosted/"},"publicDemo":null},"setup":{"extensions":{"duckdb":"SET allow_extension_repositories = 'allowed';\n\nCREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm\n    WITH PREFIX 'https://duckdb-extensions.query.farm';\n\nINSTALL vgi FROM query_farm;\nLOAD vgi FROM query_farm;","haybarn":"INSTALL vgi FROM community;\nLOAD vgi;"},"attachSql":"ATTACH 'pe' AS pe (\n  TYPE vgi,\n  LOCATION 'uvx --from git+https://github.com/Query-farm/vgi-pe@v0.5.0 vgi-pe-worker'\n);","attachOptions":[],"note":"Install and load VGI, attach the connector using the catalog alias shown here, then create required secrets. Replace placeholders and omit unused optional secret parameters. Satisfy file, network and credential prerequisites before executing a query."},"example":{"title":"Inspect an executable before running it","sql":"SET VARIABLE sample_binary = (SELECT content FROM read_blob('https://raw.githubusercontent.com/Query-farm/vgi-pe/v0.4.0/test/sql/data/hello.exe'));\nSELECT pe.main.binary_format(getvariable('sample_binary')) AS format, pe.main.machine(getvariable('sample_binary')) AS architecture, round(pe.main.overall_entropy(getvariable('sample_binary')), 3) AS entropy;","requiresCredentials":null,"note":"Reads a public sample executable as data; it does not execute the file.","objects":[{"name":"pe.main.binary_format","kind":"scalar_function","links":{"html":"https://query.farm/products/orchard/connectors/pe/#obj-main-binary_format","markdown":"https://query.farm/products/orchard/connectors/pe/objects/scalar_function.bWFpbg.YmluYXJ5X2Zvcm1hdA.md","json":"https://query.farm/products/orchard/api/v1/connectors/pe/objects/scalar_function.bWFpbg.YmluYXJ5X2Zvcm1hdA.json"}},{"name":"pe.main.machine","kind":"scalar_function","links":{"html":"https://query.farm/products/orchard/connectors/pe/#obj-main-machine","markdown":"https://query.farm/products/orchard/connectors/pe/objects/scalar_function.bWFpbg.bWFjaGluZQ.md","json":"https://query.farm/products/orchard/api/v1/connectors/pe/objects/scalar_function.bWFpbg.bWFjaGluZQ.json"}},{"name":"pe.main.overall_entropy","kind":"scalar_function","links":{"html":"https://query.farm/products/orchard/connectors/pe/#obj-main-overall_entropy","markdown":"https://query.farm/products/orchard/connectors/pe/objects/scalar_function.bWFpbg.b3ZlcmFsbF9lbnRyb3B5.md","json":"https://query.farm/products/orchard/api/v1/connectors/pe/objects/scalar_function.bWFpbg.b3ZlcmFsbF9lbnRyb3B5.json"}}],"evidence":{"status":"captured_result","capturedAt":"2026-12-01T06:16:30+00:00","engineVersion":"2.0.1","protocolVersion":"3.4.0","releaseTag":"v0.5.0","sample":{"columns":["format","architecture","entropy"],"types":["VARCHAR","VARCHAR","DOUBLE"],"rows":[["PE","X86_64",5.444]],"more":false}},"artifact":null},"objects":{"total":13,"index":"https://query.farm/products/orchard/api/v1/connectors/pe/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=pe&q={query}"},"agentTasks":["Using the attached 'pe' worker, return the executable container-format value (PE, ELF, or Mach-O) of the file at path 'test/sql/data/hello.exe'.","Using the attached 'pe' worker, return the CPU-architecture value that the binary at path 'test/sql/data/hello.exe' targets.","Using the attached 'pe' worker, is the entry-point virtual address of the file at path 'test/sql/data/hello.exe' greater than 1000000000? Return a boolean.","Using the attached 'pe' worker, does the file at path 'test/sql/data/hello.exe' have more than 10 sections? Return a boolean.","Using the attached 'pe' worker, is the whole-file Shannon entropy (bits per byte) of the file at path 'test/sql/data/hello.exe' between 4 and 7 inclusive? Return a boolean.","Using the attached 'pe' worker, is the file at path 'test/sql/data/hello_macho' code-signed (does it carry an embedded code signature)? Return the boolean.","Using the attached 'pe' worker, was the PE at path 'test/sql/data/hello.exe' built in the year 2023 according to its build timestamp? Return a boolean.","Using the attached 'pe' worker, return the PE import hash (imphash) of the file at path 'test/sql/data/hello.exe'."],"provenance":{"generatedAt":"2026-12-01T18:22:16+00:00","repository":"https://github.com/Query-farm/vgi-pe","harvest":{"status":"ok","method":"subprocess","error":null,"vgi_version":"9773130dde"},"catalogVerification":{"verified":true,"status":"passed","total":9,"passed":9,"failed":0,"needs_credentials":0,"location":"uvx --from git+https://github.com/Query-farm/vgi-pe@v0.5.0 vgi-pe-worker","transport":"subprocess","environment":{"vgi_extension_version":"9773130dde","haybarn_version":"2.0.1rc3","engine_version":"v2.0.1","python":"3.12.4","platform":"darwin_arm64","protocol_version":"3.4.0"},"checked_at":"2026-12-01T06:15:38+00:00"},"interpretation":"Catalog verification records the harvest environment. It is not proof that every query or current live API call succeeds. Only an example with captured_result has a saved result for that exact SQL."},"interpretation":["Missing, null, or undeclared metadata means unknown; do not invent defaults, credential scope, platform support or endpoint URLs.","Search is keyword retrieval, not proof of a capability. Read the exact object declaration before generating SQL.","A table and a table function can have the same name. Preserve parentheses and use the matching overload and schema.","Service credentials, external data availability and deployment authentication are separate requirements."]}