AttackMap Omeka S Analyzer
attackmap-analyzer-omeka-s is an application-aware analyzer module for AttackMap.
It focuses on Omeka S and emits structured scan signals for:
- likely admin, site, and API surfaces
- routes from Laminas-style module config, walked structurally:
child_routesjoined onto their parent (including a module's'admin' => ['child_routes' => ...]stub, joined onto Omeka core's/admin),may_terminate, Method verbs, Segment optional parts and Regexspecs (see Routes); navigation's'route' => 'admin/my-module'names a route and is not one - per-route access from Omeka's ACL and admin login (see Route access), recorded on
Route.auth/guards/guard_evidence - Omeka API key authentication (
key_identity/key_credential) as aprotocol:omeka_api_keyProtocolHint - controller hints
- secret-shaped env var names (
getenv,$_ENV) containingSECRET,TOKEN,KEY,PASSWORDorPASSWD, matched case-sensitively;DB_HOST-style connection settings are not secrets - Omeka service usage (for example
Omeka\\Connection) - module extension points such as navigation and service manager factories
This module is intentionally heuristic and incremental.
Detection
detect() looks at markers only and reads at most one small file (composer.json):
application/Module.php(Omeka S core),config/module.ini(a module repo) ormodules/<Name>/config/module.ini, by existence;composer.jsonnamedomeka/omeka-s, of typeomeka-s-module, or requiring anomeka/*package.
A generic Laminas app (module/ + config/application.config.php) is not Omeka S.
Routes
Router config is read with a small PHP-array tokenizer (phparray.py, routes.py, copied from attackmap-analyzer-php-laminas so this plugin has no cross-plugin dependency; mlaify/AttackMap#259 tracks extracting shared PHP helpers). child_routes are joined, may_terminate is honored, Method children set the HTTP method, and Segment optional parts expand to the minimal form plus one more optional group per form (at most 4 paths per route). Laminas merges every module's config, so a module's stub ('admin' => ['child_routes' => [...]], no type or route) joins the route of that name defined elsewhere in the repo, or else Omeka core's top, site, admin, admin/site, admin/site/slug and api routes (with their __NAMESPACE__, __ADMIN__ and __KEYAUTH__ defaults).
Route access
Each route's auth is decided from Omeka's own checks:
__ADMIN__routes (/admin/..., including module routes underadmin) arerequired:MvcListeners::redirectToLoginsends anonymous visitors to the login page. Guards:omeka:admin_login, plus the ACL role guards below.- The ACL.
$acl->allow(<roles>, <resources>, <privileges>[, <assertion>])and->deny(...)are read fromModule.php(onBootstrap,attachListenersand helpers) and*AclFactory.php(Omeka core). Resources are controller names ('Omeka\Controller\Site\Item',Controller\IndexController::classresolved throughnamespace/use); the route's controller comes from itscontrollerdefault, through__NAMESPACE__as Laminas'ModuleRouteListenerdoes ('item-set'→…\ItemSet). The privilege is the action.- Lookup order follows Laminas'
Acl::isAllowed: the specific controller before the all-resources level (nullresource); at each level the role's own rules, then all-roles rules; the privilege before all privileges; the last rule written for a slot wins. Anull-resource rule is applied, as Laminas'setRuledoes, to every resource registered so far, and Omeka registers every controller before adding rules, so it overwrites earlier rules in the controllers' slots:deny(null, 'X', 'show'); allow(null, null, 'show')allowsshowon X. An all-roles, all-privileges deny on the controller continues to the all-resources level, as in Laminas. Two public principals are checked: the visitor (all-roles rules only) and'guest'(the Guest module's self-registration role, treated as public;Acl::ROLE_*constants resolve to their values, soAcl::ROLE_GUESTis'guest'). Role inheritance isn't modelled; Omeka adds its roles without parents. anonymous: the visitor or a guest is allowed.guard_evidencequotes the deciding rule, narrowed to the matched resource, and its location.required: both are denied by a rule (omeka_acl:deny_anonymous) or by Omeka's default deny. Omeka checks the role on every dispatch (authorizeUserAgainstController). Guards:omeka_acl:requires_role(<role>)for each role allowed, oromeka_acl:default_deny.unknown: a conditional rule (assertion) decides, a:actionroute's actions disagree, a rule's role or privilege list couldn't be read (a variable, constant or mixed array; for fixed actions too), or the per-repo budget (50,000 fresh decisions) is spent. An anonymous rule whose resource can't be resolved (allow(null, $controllers)), or a zero-argumentallow()outside*AclFactory.php, turns every deny intounknown.- Registration. Omeka adds only the keys of
controllers.invokables/factoriesas ACL resources, andauthorizeUserAgainstControllerlets through a controller that isn't a resource. A route to a controller alias is thereforeanonymous(with that evidence); a route to a controller registered nowhere the analyzer saw isunknown. - A
:controllerroute (/s/:site-slug/:controller) is decided over every controller and alias under its__NAMESPACE__:anonymousorrequiredonly if all agree. Decisions are memoised per (controller, action) and per (namespace, action), with rules indexed per resource in program order (never expanded per privilege, so the index stays linear in the source). - Install and migration. AclFactory's zero-argument
allow()grants everything while Omeka isn't installed or needs a migration, when MvcListeners sends every request to/installor/migrate. Those controllers are neverrequired:unknown, with a note. - ACL decisions are only made in a repo with Omeka markers or ACL rules.
- Lookup order follows Laminas'
- API key auth. Routes whose defaults set
'__KEYAUTH__' => true(Omeka's/api) acceptkey_identity/key_credentialquery parameters (MvcListeners::authenticateApiKey). Theirguard_evidencesays so, and aprotocol:omeka_api_keyProtocolHintis emitted for the route file and for code that reads the parameters (getQuery('key_identity')). API keys are optional:/apiisanonymousat the controller level (allow(null, 'Omeka\Controller\Api')), and the API adapters' own ACL decides per resource.
Install
uv tool install attackmap --with attackmap-analyzer-omeka-s # from PyPI
# or: pip install attackmap-analyzer-omeka-s (installs attackmap too)
# or from source:
pip install git+https://github.com/mlaify/attackmap-analyzer-omeka-s.git
Usage with AttackMap
attackmap analyze /path/to/repo --module omeka-s
Metadata
Release files for attackmap-analyzer-omeka-s 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| attackmap_analyzer_omeka_s-0.2.1.tar.gz | 42.9 kB | With provenance | Details for attackmap_analyzer_omeka_s-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| attackmap_analyzer_omeka_s-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for attackmap_analyzer_omeka_s-0.2.1-py3-none-any.whl |
Total release size: 75.7 kB
Release files / attackmap_analyzer_omeka_s-0.2.1.tar.gz
| Download URL | attackmap_analyzer_omeka_s-0.2.1.tar.gz |
|---|---|
| Size | 42.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
33b05fe5caf6b8caeda5b24d63691d9eca30cefb0644819c19c2512bc895834a
|
|
BLAKE2b-256 checksum How to use checksums |
03fac180ff6491fbc136146bd00b621abdf47ac6318311ac9523da0e8eed260a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / attackmap_analyzer_omeka_s-0.2.1-py3-none-any.whl
| Download URL | attackmap_analyzer_omeka_s-0.2.1-py3-none-any.whl |
|---|---|
| Size | 32.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b82632c056e3973b52a72cb4a0cdb2226f62140d5c18f85e058de091416e59f0
|
|
BLAKE2b-256 checksum How to use checksums |
7428987caa7f19de1899b50ef12ad8bb675934e9d697d23513e7b89a4a071f3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for attackmap-analyzer-omeka-s 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for attackmap_analyzer_omeka_s-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.