Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
47ded86
chore: Fix build errors
hypery2k Mar 15, 2025
93878b7
chore: Adjust github build
hypery2k Mar 15, 2025
86e96be
chore: Run build on new default branch and MRs
hypery2k Mar 15, 2025
3a4f667
chore: new build setup
hypery2k Mar 15, 2025
d368804
chore: Fix build
hypery2k Mar 15, 2025
68afdeb
chore: Fix build
hypery2k Mar 15, 2025
f4ae01e
chore: Enable renovate
hypery2k Mar 15, 2025
c282963
feat(Docker): Adding docker image for running
hypery2k Mar 15, 2025
d534fc1
feat(Docker): Finalize docker usage
hypery2k Mar 15, 2025
d01783b
chore(deps): update actions/checkout action to v4
renovate[bot] Mar 15, 2025
de3f03d
chore(deps): update dependency @types/glob to v8
renovate[bot] Mar 15, 2025
113913c
chore(deps): update actions/setup-node action to v4
renovate[bot] Mar 15, 2025
4d5fe9e
chore(deps): update dependency @types/mocha to v10
renovate[bot] Mar 15, 2025
9c595ad
chore(deps): update dependency nyc to v17
renovate[bot] Mar 16, 2025
21b0b32
chore(deps): update dependency lint-staged to v15
renovate[bot] Mar 15, 2025
46ee5d1
chore(deps): update dependency husky to v9
renovate[bot] Apr 8, 2025
f8c4c1d
chore(deps): update dependency rimraf to v6
renovate[bot] Apr 8, 2025
0b7b467
chore(deps): update dependency ts-node to v10
renovate[bot] Apr 8, 2025
35c5154
chore(deps): update dependency mocha to v11
renovate[bot] Apr 8, 2025
b34a751
fix(deps): update dependency fast-json-patch to v3
renovate[bot] Apr 8, 2025
be25850
fix(deps): update dependency glob to v11
renovate[bot] Apr 9, 2025
2df257c
chore: Adding release action
hypery2k Apr 9, 2025
3d5162c
chore: Set correct package name
hypery2k Apr 9, 2025
85095aa
chore(release): v0.2.0 [skip ci]
invalid-email-address Apr 9, 2025
11710fc
chore(deps): update dependency lint-staged to v15.5.1
renovate[bot] Apr 11, 2025
be448f8
fix(deps): update dependency glob to v11.0.2
renovate[bot] Apr 23, 2025
067fdac
chore(deps): update node.js to v22.15.0
renovate[bot] Apr 23, 2025
4c61089
chore(deps): update dependency @types/node to v22.15.3
renovate[bot] Apr 28, 2025
934bbab
fix(CLI): Allow regex CLI option
hypery2k Apr 28, 2025
0697793
fix(Gitlab): Correcting support for JSON 2020 Draft with Regex
hypery2k Apr 28, 2025
70b0ae4
chore(release): v0.2.1 [skip ci]
invalid-email-address Apr 28, 2025
65c3b1b
chore: Fix docker image name
hypery2k Apr 28, 2025
988b1e5
chore(deps): update dependency mocha to v11.2.2
renovate[bot] May 1, 2025
53825f1
chore(deps): update dependency @types/node to v22.15.9
renovate[bot] May 6, 2025
87bd4c1
chore(deps): update dependency @types/node to v22.15.10
renovate[bot] May 6, 2025
7809a76
chore(deps): update dependency @types/node to v22.15.12
renovate[bot] May 6, 2025
33bc9b7
chore(deps): update dependency lint-staged to v15.5.2
renovate[bot] May 6, 2025
c35b50d
chore(deps): update dependency @types/node to v22.15.14
renovate[bot] May 6, 2025
2988c1e
chore(deps): update dependency @types/node to v22.15.15
renovate[bot] May 7, 2025
60635f1
chore(deps): update dependency @types/node to v22.15.16
renovate[bot] May 8, 2025
12cadea
chore(deps): update dependency @types/node to v22.15.17
renovate[bot] May 8, 2025
aefd5cb
chore(deps): update dependency @types/node to v22.15.18
renovate[bot] May 14, 2025
4b3450a
chore(deps): update node.js to v22.15.1
renovate[bot] May 15, 2025
bc2eca6
chore(deps): update dependency mocha to v11.3.0
renovate[bot] May 16, 2025
0cdfe8e
chore(deps): update dependency @types/node to v22.15.19
renovate[bot] May 19, 2025
23bb530
chore(deps): update dependency mocha to v11.4.0
renovate[bot] May 19, 2025
3280d1b
chore(deps): update dependency @types/node to v22.15.20
renovate[bot] May 20, 2025
e6a4ab7
chore(deps): update dependency @types/node to v22.15.21
renovate[bot] May 21, 2025
5233d20
chore(deps): update node.js to v22.16.0
renovate[bot] May 21, 2025
be29140
chore(deps): update dependency lint-staged to v16
renovate[bot] May 10, 2025
049bd0b
chore(deps): update dependency mocha to v11.5.0
renovate[bot] May 23, 2025
5cd53ce
chore(deps): update dependency @types/node to v22.15.22
renovate[bot] May 27, 2025
98ca03d
chore(deps): update dependency lint-staged to v16.1.0
renovate[bot] May 27, 2025
e9a86ff
chore(deps): update dependency @types/node to v22.15.23
renovate[bot] May 27, 2025
961bc15
chore(deps): update dependency @types/node to v22.15.24
renovate[bot] May 28, 2025
3d4ef2f
chore(deps): update dependency @types/node to v22.15.26
renovate[bot] May 30, 2025
e2c8bc2
chore(deps): update dependency @types/node to v22.15.27
renovate[bot] May 30, 2025
06291a3
chore(deps): update dependency @types/node to v22.15.28
renovate[bot] May 30, 2025
d812c4c
chore(deps): update dependency @types/node to v22.15.29
renovate[bot] May 30, 2025
7dd02c9
chore(deps): update dependency @types/node to v22.15.30
renovate[bot] Jun 6, 2025
1b439de
chore(deps): update dependency mocha to v11.6.0
renovate[bot] Jun 9, 2025
a90f979
chore(deps): update dependency @types/node to v22.15.31
renovate[bot] Jun 10, 2025
619049a
fix(deps): update dependency glob to v11.0.3
renovate[bot] Jun 12, 2025
8b11bf3
chore(deps): update dependency lint-staged to v16.1.1
renovate[bot] Jun 14, 2025
8b66be1
chore(deps): update dependency lint-staged to v16.1.2
renovate[bot] Jun 15, 2025
935f8b5
chore(deps): update dependency @types/node to v22.15.32
renovate[bot] Jun 16, 2025
d470bfc
chore(deps): update dependency mocha to v11.7.0
renovate[bot] Jun 18, 2025
c1dd361
chore(deps): update dependency @types/node to v22.15.33
renovate[bot] Jun 24, 2025
5ffc838
chore(deps): update dependency mocha to v11.7.1
renovate[bot] Jun 24, 2025
c1a4484
chore(deps): update node.js to v22.17.0
renovate[bot] Jun 25, 2025
d900b1a
chore(deps): update dependency @types/node to v22.15.34
renovate[bot] Jun 28, 2025
ab45ef2
chore(deps): update dependency @types/node to v22.15.35
renovate[bot] Jul 1, 2025
1dbc5d0
chore(deps): update dependency @types/node to v22.16.0
renovate[bot] Jul 1, 2025
f53ed13
chore(deps): update dependency @types/node to v22.16.1
renovate[bot] Jul 8, 2025
7931aa8
chore(deps): update dependency @types/node to v22.16.2
renovate[bot] Jul 9, 2025
8a267ce
chore(deps): update dependency @types/node to v22.16.3
renovate[bot] Jul 10, 2025
a559c42
chore(deps): update dependency @types/node to v22.16.4
renovate[bot] Jul 15, 2025
a93ca77
chore(deps): update node.js to v22.17.1
renovate[bot] Jul 16, 2025
efe19c7
chore(deps): update dependency @types/node to v22.16.5
renovate[bot] Jul 19, 2025
79db66c
chore(deps): update dependency cross-env to v10
renovate[bot] Sep 29, 2025
049502f
chore(deps): update dependency @types/glob to v9
renovate[bot] Sep 25, 2025
db3ade0
chore(release): v0.2.2 [skip ci]
invalid-email-address Oct 18, 2025
401ff7a
chore(deps): update dependency lint-staged to v16.1.6
renovate[bot] Oct 18, 2025
07e1b58
chore(deps): update dependency mocha to v11.7.4
renovate[bot] Oct 18, 2025
ef923f0
chore(deps): update dependency @types/node to v22.18.11
renovate[bot] Oct 18, 2025
38fda55
chore(deps): update dependency lint-staged to v16.2.4
renovate[bot] Oct 18, 2025
2c1a00b
chore(deps): update node.js to v22.20.0
renovate[bot] Oct 18, 2025
a67ab53
chore(deps): update dependency @types/node to v22.18.13
renovate[bot] Nov 20, 2025
fc50c9f
chore(deps): update dependency js-yaml to v3.14.2
renovate[bot] Nov 20, 2025
5b97e7a
chore(deps): update dependency lint-staged to v16.2.7
renovate[bot] Nov 21, 2025
7603c7f
chore(deps): update dependency mocha to v11.7.5
renovate[bot] Nov 21, 2025
675ea84
chore(deps): update dependency @types/node to v22.19.1
renovate[bot] Nov 21, 2025
9f3eafd
chore(deps): update dependency glob to v11.1.0
renovate[bot] Nov 21, 2025
6e681b3
chore(deps): update dependency rimraf to v6.1.2
renovate[bot] Nov 21, 2025
5c823c7
chore(deps): update node.js to v22.21.1
renovate[bot] Nov 21, 2025
7279ae6
chore(deps): update actions/checkout action to v6
renovate[bot] Nov 21, 2025
4879d59
chore(deps): update actions/setup-node action to v6
renovate[bot] Nov 27, 2025
71fae6a
chore(deps): roll back avakar/tag-and-release action to v1.0.0
renovate[bot] Dec 23, 2025
af2181d
chore(deps): update dependency @types/node to v22.19.6
renovate[bot] Jan 15, 2026
62f6396
chore(deps): update node.js to v22.22.0
renovate[bot] Jan 15, 2026
a76ad71
chore: Update funding links
hypery2k Jan 16, 2026
d64affc
fix(deps): update dependency glob to v13
renovate[bot] Mar 5, 2026
6026609
chore(deps): update dependency @types/node to v22.19.15
renovate[bot] Mar 12, 2026
38d4ed0
refactor: Remove deprecated API usages and adding more tests
hypery2k Mar 12, 2026
91e0d1d
chore: Minor security updates
hypery2k Mar 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
github: epoberezkin
open_collective: ajv
# These are supported funding model platforms
open_collective: m13t
github: ContinuousSecurityTooling
buy_me_a_coffee: hypery2k
custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=H8TR8246RCDJG
63 changes: 56 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,77 @@
name: build

on:
# allow to manual run the action
workflow_dispatch: {}
pull_request: {}
merge_group: {}
push:
branches: [master]
pull_request:
branches: ["*"]
branches:
- develop
tags:
- "*"

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: npm install

- name: npm build and test
run: |
npm run clean
npm run build
npm run test
- run: npm test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
package:
name: Package Application
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
# renovate: datasource=docker depName=node
node-version: "22"
- name: "Build Package"
run: |
npm run clean
npm run build

- name: Test Container Image
id: test-image
run: |
docker build -t continuoussecuritytooling/ajv-cli:${{github.run_number}} .
wget https://gitlab.com/gitlab-org/gitlab/-/raw/master/ee/app/validators/json_schemas/security_orchestration_policy.json
docker run -u 0 -v $(pwd):/build continuoussecuritytooling/ajv-cli:${{github.run_number}} migrate --spec=draft2020 -s /build/security_orchestration_policy.json
docker run -u 0 -v $(pwd):/build continuoussecuritytooling/ajv-cli:${{github.run_number}} validate --spec=draft2020 --strict=false --validate-formats=true -c ajv-formats --unicodeRegExp=false -s /build/security_orchestration_policy.json -d /build/test/gitlab/policy.yml

build-results:
name: Build results
if: ${{ always() }}
runs-on: ubuntu-latest
needs:
- build
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}
27 changes: 0 additions & 27 deletions .github/workflows/publish.yml

This file was deleted.

117 changes: 117 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Create release # You may choose a different name
run-name: ${{ inputs.releaseversion }} # Enumerates entries in the "workflow runs" view
on:
workflow_dispatch:
inputs:
releaseversion:
description: 'Release version'
required: true
type: string
default: "X.Y.Z"

jobs:
release: # Arbitrarily chosen
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:

- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.CI_APP_ID }}
private-key: ${{ secrets.CI_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
ref: ${{ github.head_ref }}

- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Configure Git author
run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'

- name: Setup NodeJS
uses: actions/setup-node@v6
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'

- name: Package Application
run: |
npm run clean
npm version --no-git-tag-version ${{ github.event.inputs.releaseversion }}
npm run build

- name: Write version vars
run: |
BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
BRANCH=${GITHUB_REF_NAME#v}
APP_VERSION=$(cat package.json | grep version| head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g')
echo Version: $APP_VERSION
echo "VERSION=$APP_VERSION" >> $GITHUB_ENV
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV

- name: Conventional Changelog Action
uses: TriPSs/conventional-changelog-action@v6
with:
input-file: CHANGELOG.md
github-token: ${{ steps.app-token.outputs.token }}
version-file: package.json
pre-release: true
skip-bump: true
skip-tag: true
skip-on-empty: true
tag-prefix: 'v'

- name: Create Release on GH
id: tag-and-release
uses: avakar/tag-and-release@v1.0.0
with:
draft: true
release_name: ${{ github.event.inputs.releaseversion }}
tag_name: v${{ github.event.inputs.releaseversion }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build Container Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: continuoussecuritytooling/ajv-cli
tags: 'latest ${{ github.event.inputs.releaseversion }}'
containerfiles: |
./Dockerfile
build-args: |
BUILD_DATE=${{ env.BUILD_DATE }}
APP_VERSION=${{ github.event.inputs.releaseversion }}

- name: Push To Docker Hub
id: push-to-dockerhub-preview
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: 'latest ${{ github.event.inputs.releaseversion }}'
registry: registry.hub.docker.com
username: continuoussecuritytooling
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Publish npm package
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ coverage
node_modules

.DS_Store
package-lock.json
dist
.qodo
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## [0.2.2](https://github.com/ContinuousSecurityTooling/ajv-cli/compare/v0.2.1...v0.2.2) (2025-10-18)


### Bug Fixes

* **deps:** update dependency glob to v11.0.3 ([619049a](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/619049a4d4036c867fe44b984339e5e2b1f0d011))



## [0.2.1](https://github.com/ContinuousSecurityTooling/ajv-cli/compare/v0.2.0...v0.2.1) (2025-04-28)


### Bug Fixes

* **CLI:** Allow regex CLI option ([934bbab](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/934bbabbec9fa8b7c432535d23e13b0a8e9208ac))
* **deps:** update dependency glob to v11.0.2 ([be448f8](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/be448f8cacae185ee5b4341ce9db1eb033d33102))
* **Gitlab:** Correcting support for JSON 2020 Draft with Regex ([0697793](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/06977932f68d8027d38e8211764a4b9becfff999))



# 0.2.0 (2025-04-09)


### Bug Fixes

* **deps:** update dependency fast-json-patch to v3 ([b34a751](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/b34a7511ad17af7f176fe50aa645e3f51242759a))
* **deps:** update dependency glob to v11 ([be25850](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/be25850338e2cbfac635c94227cf18c2cace9576))
* set `$data` option in the presence of the `--data` switch ([8c440a5](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/8c440a564fb712b3a2ed93d443e561117ab036b6)), closes [#93](https://github.com/ContinuousSecurityTooling/ajv-cli/issues/93)


### Features

* compile schema to standalone module exporting validation function using ajv-pack, closes [#1](https://github.com/ContinuousSecurityTooling/ajv-cli/issues/1) ([e303d61](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/e303d61b6be5fda212c63e5e5c0e8f38ec793095))
* custom keywords/formats, [#17](https://github.com/ContinuousSecurityTooling/ajv-cli/issues/17), [#18](https://github.com/ContinuousSecurityTooling/ajv-cli/issues/18) ([666dad7](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/666dad73579ded698b8b3f63fad94973b5dc6e22))
* **Docker:** Adding docker image for running ([c282963](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/c28296328e70d1b16a4cd2d1f7610b24074766fe))
* **Docker:** Finalize docker usage ([d534fc1](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/d534fc1e312dc343328d6191ffc01ddf8302b5fd))
* help for "migrate" command ([f1bd6d2](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/f1bd6d2c4413e61591ee04b6c514063ab0ca3586))
* migrate schema to draft-06 ([74c61bc](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/74c61bcbfb42c1e47026ca264dc14503b32f56eb))
* option inline-refs; fixed options with value "false", closes [#19](https://github.com/ContinuousSecurityTooling/ajv-cli/issues/19) ([62b0ba3](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/62b0ba3bd429ac9751a7cba4d979fb0a385e2f11))
* options -o and -c added to help ([eda7450](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/eda74505403c6e4749a2127b1e8c0e9b11947939))
* options supported by Ajv 5.0 ([cce95e6](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/cce95e6dfc475cb3d51bd2a2e6c0131ae950fdde))
* support `json5` & `yaml` file types ([974d686](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/974d6864f56abd8428671874b56127873779e1d0))
* support draft-04 meta-schema by default, closes [#28](https://github.com/ContinuousSecurityTooling/ajv-cli/issues/28) ([a297a43](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/a297a430376b3e127d45df48ff832439fe11bda1))
* support keywords written in typescript ([f13a09a](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/f13a09a85b7e95e824b523764e8f49c1dae6fa0b))
* use draft-06, remove v5 option and tests ([5a63420](https://github.com/ContinuousSecurityTooling/ajv-cli/commit/5a6342066e37b1c967873fb2fd4798853c4e3b56))



31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM node:22.22.0-slim

ARG BUILD_DATE
ARG APP_VERSION

LABEL org.opencontainers.image.authors='Martin Reinhardt (martin@m13t.de)' \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$APP_VERSION \
org.opencontainers.image.url='https://hub.docker.com/r/continuoussecuritytooling/ajv-cli' \
org.opencontainers.image.documentation='https://github.com/ContinuousSecurityTooling/ajv-cli' \
org.opencontainers.image.source='https://github.com/ContinuousSecurityTooling/ajv-cli.git' \
org.opencontainers.image.licenses='MIT'

COPY dist/ docker_entrypoint.sh package-lock.json package.json /app

WORKDIR /app

RUN npm install --omit=dev &&\
npm install ajv-formats &&\
ln -s /app/index.js /usr/local/bin/ajv-cli && chmod +x /usr/local/bin/ajv-cli &&\
chown -R 1000:2000 /app /usr/local/bin/ajv-cli

# apt update
RUN apt-get update && apt-get -y upgrade &&\
apt-get install -y jq wget curl &&\
# clean up to slim image
apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/{apt,dpkg,cache,log}/

USER 1000

ENTRYPOINT ["/app/docker_entrypoint.sh"]
Loading
Loading