Mutation

update_bcheck_by_name

Upload a BCheck to replace an existing BCheck with the same name

Arguments

input: UpdateBCheckByNameInput!


Input Fields

filename(): String!
The name of the BCheck file.
script(): String!
The BCheck script itself.

Return Fields

bcheck(): BCheck!
The updated BCheck.

Example

Query
mutation UpdateBCheckByName($input: UpdateBCheckByNameInput!) {
  update_bcheck_by_name(input: $input) {
    bcheck {
      id
      name
      description
    }
  }
}
Variables
{
  "input": {
    "filename": "exposed-git-repository.bcheck",
    "script": "metadata:\n    language: v2-beta\n    name: \"Exposed Git repository\"\n    description: \"Reports a .git directory that anyone can download\"\n    author: \"Example Security Team\"\n    tags: \"git\", \"information disclosure\"\n\ngiven host then\n    send request called check:\n        method: \"GET\"\n        path: \"/.git/HEAD\"\n\n    if {check.response.status_code} is \"200\" and \"ref: refs/heads/\" in {check.response.body} then\n        report issue:\n            severity: medium\n            confidence: firm\n            detail: \"The .git directory can be downloaded, which can expose the site's source code.\"\n            remediation: \"Block access to the .git directory on the web server.\"\n    end if\n"
  }
}
Result
{
  "data": {
    "update_bcheck_by_name": {
      "bcheck": {
        "id": "12ffd49d-b489-3d26-b4c9-7e1261136166",
        "name": "Exposed Git repository",
        "description": "Reports a .git directory that anyone can download"
      }
    }
  }
}