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

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: 4a0a00473045022100ecf4dd523b734556f49d9420e332c1a65c46dfd1cc1b31a0499e8822333bada802207a230ac4f9c7ba6dca1e1d86791f24480742a8d52653f646a4f8af67f583c037:922c64590222798bb761d5b6d8e72950