Skip to content

Files, positive model, virtual patches and validation policy Since v0.2 ​

These sections cover uploads, the learned positive model, virtual patches and validation scans. Paths are relative to one entry of applications.

For the structure of the file, see Configuration file. Defaults of limits are also listed in Limits and defaults. A dash in Default means the code sets no default value (the setting is empty or off).

File uploads ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.filesobject——Group of settings: files.File uploads
applications[].policy.files.enabledboolean——Turns the feature on or off.File uploads
applications[].policy.files.modestring—detect, blockWhether the feature only logs (detect) or also acts (block).File uploads
applications[].policy.files.rules[]list of object——Group of settings: rules.File uploads
applications[].policy.files.rules[].pathslist of string——Request paths the setting applies to.File uploads
applications[].policy.files.rules[].max_sizesize——Sets max size.File uploads
applications[].policy.files.rules[].allowlist of string——Sets allow.File uploads
applications[].policy.files.rules[].denylist of string——Sets deny.File uploads
applications[].policy.files.rules[].json_fieldslist of string——Sets json fields.File uploads
applications[].policy.files.rules[].rawboolean——Sets raw.File uploads
applications[].policy.files.rules[].archivesstring——Sets archives.File uploads
applications[].policy.files.rules[].encryptedstring——Sets encrypted.File uploads
applications[].policy.files.mismatchstring——Sets mismatch.File uploads
applications[].policy.files.scriptsstring——Sets scripts.File uploads
applications[].policy.files.namesstring——Sets names.File uploads
applications[].policy.files.webshellsstring——Sets webshells.File uploads
applications[].policy.files.hash_listsobject——Group of settings: hash lists.File uploads
applications[].policy.files.hash_lists.denylist of string——Sets deny.File uploads
applications[].policy.files.hash_lists.allowlist of string——Sets allow.File uploads
applications[].policy.files.icapobject——Group of settings: icap.File uploads
applications[].policy.files.icap.serverstring——Sets server.File uploads
applications[].policy.files.icap.max_sizesize——Sets max size.File uploads
applications[].policy.files.icap.oversizestring——a file over max_size: block or allow (reported as not scanned)File uploads
applications[].policy.files.icap.on_failurestring——server unavailable: inherit (the application's failure policy), open or closedFile uploads
applications[].policy.files.icap.membersboolean——also send archive members (servers that do not unpack archives)File uploads

Positive model ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.positiveobject——Group of settings: positive.Positive model
applications[].policy.positive.enabledboolean——Turns the feature on or off.Positive model
applications[].policy.positive.modestring—detect, blockWhether the feature only logs (detect) or also acts (block).Positive model
applications[].policy.positive.learningobject——Group of settings: learning.Positive model
applications[].policy.positive.learning.enabledboolean——Turns the feature on or off.Positive model
applications[].policy.positive.learning.sample_rateinteger——Sets sample rate.Positive model
applications[].policy.positive.learning.min_samplesinteger——Sets min samples.Positive model
applications[].policy.positive.learning.min_clientsinteger——Sets min clients.Positive model
applications[].policy.positive.learning.min_durationduration——Sets min duration.Positive model
applications[].policy.positive.learning.min_confidenceinteger——percentPositive model
applications[].policy.positive.learning.fold_thresholdinteger——Sets fold threshold.Positive model
applications[].policy.positive.learning.headerslist of string——Header names or values.Positive model
applications[].policy.positive.learning.cookieslist of string——Cookie names the setting covers.Positive model
applications[].policy.positive.learning.bodiesboolean——learn JSON request body structurePositive model
applications[].policy.positive.learning.responsesboolean——learn JSON answers (asks for response bodies)Positive model
applications[].policy.positive.learning.response_sample_rateinteger——answers per second per endpointPositive model
applications[].policy.positive.unknown_endpointsstring——log | refusePositive model
applications[].policy.positive.unknown_parametersstring——log | refusePositive model
applications[].policy.positive.confirm_anomaliesboolean——Sets confirm anomalies.Positive model
applications[].policy.positive.staged_rules[]list of object——staged_rules only log until a date: refusals of these rules (pos.param.* ...) are recorded as staged, so new rules can run in block mode without refusing yet.Positive model
applications[].policy.positive.staged_untiltime (RFC 3339)——Sets staged until.Positive model
applications[].policy.positive.ruleslist of object——rules are the endpoints' rules: learned (approved suggestions) and manual, in one list (the policy list positive_rules).Positive model

Virtual patches ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.virtual_patches[]list of object——Group of settings: virtual patches.Virtual patches
applications[].policy.virtual_patches[].idstring——vp-NNNN (1 to 9999), assigned on importVirtual patches
applications[].policy.virtual_patches[].classstring——one of VirtualPatchClassesVirtual patches
applications[].policy.virtual_patches[].targetstring——arg:NAME, header:NAME, cookie:NAME, body, any_arg, pathVirtual patches
applications[].policy.virtual_patches[].pathslist of string——exact, or a prefix ending in *Virtual patches
applications[].policy.virtual_patches[].methodslist of string——HTTP methods the setting applies to.Virtual patches
applications[].policy.virtual_patches[].scannerstring——Where the patch came from (empty for a hand-made patch).Virtual patches
applications[].policy.virtual_patches[].reportstring——Sets report.Virtual patches
applications[].policy.virtual_patches[].findingstring——the finding's key in the reportVirtual patches
applications[].policy.virtual_patches[].commentstring——Free-text note kept with the entry.Virtual patches
applications[].policy.virtual_patches[].enforcestring——enforce "block" makes the patch refuse what it matches even while the application or the signatures module is in detect, so one proven patch can block while the rest of the rules only log.Virtual patches

Validation ​

KeyTypeDefaultAllowed values / rangeMeaningGuide page
applications[].policy.validationobject——validation says whether and how this application may be scanned (ADM-17).Prove it
applications[].policy.validation.allow_scanboolean——Sets allow scan.Prove it
applications[].policy.validation.notestring——Free-text note for operators.Prove it
applications[].policy.validation.listenerstring——Sets listener.Prove it
applications[].policy.validation.hoststring——Host name this entry applies to or connects to.Prove it
applications[].policy.validation.health_pathstring——Sets health path.Prove it
applications[].policy.validation.seedsobject——Group of settings: seeds.Prove it
applications[].policy.validation.seeds.urlslist of string——Sets urls.Prove it
applications[].policy.validation.seeds.openapilist of string——Sets openapi.Prove it
applications[].policy.validation.seeds.graphqllist of string——Sets graphql.Prove it
applications[].policy.validation.seeds.openapi_fileslist of string——openapi_files are descriptions on the control node's disk, for an API that does not serve its own.Prove it
applications[].policy.validation.exclude_pathslist of string——Sets exclude paths.Prove it
applications[].policy.validation.engineslist of string——Sets engines.Prove it
applications[].policy.validation.authobject——Group of settings: auth.Prove it
applications[].policy.validation.auth.typestring——Kind of this entry.Prove it
applications[].policy.validation.auth.login_pathstring——Sets login path.Prove it
applications[].policy.validation.auth.username_fieldstring——Sets username field.Prove it
applications[].policy.validation.auth.password_fieldstring——Sets password field.Prove it
applications[].policy.validation.auth.usernamestring——Sets username.Prove it
applications[].policy.validation.auth.token_fieldstring——Sets token field.Prove it
applications[].policy.validation.auth.fieldslist of string——Sets fields.Prove it
applications[].policy.validation.auth.cookieslist of string——Cookie names the setting covers.Prove it
applications[].policy.validation.auth.headerstring——Name of the header.Prove it
applications[].policy.validation.auth.check_pathstring——Sets check path.Prove it
applications[].policy.validation.limitsobject——Group of settings: limits.Prove it
applications[].policy.validation.limits.profilestring——Sets profile.Prove it
applications[].policy.validation.limits.rateinteger——Sets rate.Prove it
applications[].policy.validation.limits.concurrencyinteger——Sets concurrency.Prove it
applications[].policy.validation.limits.requestsinteger——Sets requests.Prove it
applications[].policy.validation.limits.durationduration——Sets duration.Prove it

Example ​

yaml
version: 2
listeners:
  - {name: web, address: "0.0.0.0:8080", protocol: http}
server_pools:
  - name: shop
    servers:
      - {address: "127.0.0.1:9000", weight: 1, state: active}
icap_servers:
  - name: av
    url: icap://av.internal/avscan
applications:
  - name: shop
    hostnames: [shop.example.com]
    listeners: [web]
    server_pool: shop
    policy:
      files:
        mode: block
        icap: {server: av, on_failure: open}
        rules:
          - paths: ["/upload/*"]
            allow: [image, pdf]
            max_size: 5MiB