id: bun-lock

info:
  name: Bun Lock File Disclosure
  author: noraj
  severity: info
  description: |
    The bun.lockb file is similar to the package-lock.json file used by npm or the yarn.lock file used by Yarn. It serves as a lock file that ensures consistent and reproducible installations of dependencies across different environments.
  reference:
    - https://bun.sh/docs/install/lockfile
  metadata:
    verified: true
    max-request: 1
    fofa-query: body=="bun.lockb"
  tags: exposure,files,node,npm,bun,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/bun.lockb"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "bun-lockfile-format-v0"
          - "#!/usr/bin/env bun"
        condition: or

      - type: word
        part: header
        words:
          - "application/octet-stream"

      - type: status
        status:
          - 200
# digest: 4a0a00473045022100f8f0415715845d71fd96e80d43e46125815494915f316b7ef06776ace950aa360220370e2a0d7bc17dedefa2031bd8ee73b6e4b55aa523738359a7fa62b6b25b3bd3:922c64590222798bb761d5b6d8e72950