# AgentSec lockfile check (preview 0.0.1-preview.2). Include in .gitlab-ci.yml:
#   include: { local: agentsec.gitlab-ci.yml }
# Downloads the pinned preview and checks it against the SHA-256 written here (not one fetched
# from the same host), then checks package-lock.json.
agentsec-check:
  image: node:22-alpine
  stage: test
  variables:
    AGENTSEC_VERSION: '0.0.1-preview.2'
  script:
    - wget -q "https://agentsec.store/downloads/agentsec-ci-check/agentsec-ci-check-${AGENTSEC_VERSION}.tar.gz"
    - echo "885497f6c53df98e3630f5c4bdf85f55af2a62eb27fcab5e9f960ef74b60b17c  agentsec-ci-check-${AGENTSEC_VERSION}.tar.gz" | sha256sum -c -
    - tar -xzf "agentsec-ci-check-${AGENTSEC_VERSION}.tar.gz"
    - node "agentsec-ci-check-${AGENTSEC_VERSION}/bin/agentsec-ci.mjs" package-lock.json
