diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41be136..24e4336 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,15 +15,41 @@ jobs: checks: write steps: - uses: actions/checkout@v3 + - name: Check working directory after checkout + run: pwd - uses: actions/setup-node@v4 with: node-version: '22.x' - - run: npm ci + - name: Check working directory after setup-node + run: pwd + - name: Install dependencies + run: | + pwd + npm ci + - name: Download regions.json + run: | + pwd + ls -la + mkdir -p dist/lib + pwd + npm run download-regions + pwd + ls -la dist/lib/ || echo "dist/lib does not exist" + if [ ! -f dist/lib/regions.json ]; then + echo "Error: regions.json was not downloaded successfully" + exit 1 + fi + - name: Check working directory before tests + run: | + pwd + ls -la - uses: ArtiomTr/jest-coverage-report-action@v2 id: coverage-utils-js continue-on-error: true with: output: comment, report-markdown + test-script: npm test + skip-step: install - uses: marocchino/sticky-pull-request-comment@v2 continue-on-error: true if: steps.coverage-utils-js.outputs.report != '' diff --git a/.github/workflows/secrets-scan.yml b/.github/workflows/secrets-scan.yml deleted file mode 100644 index f9db69f..0000000 --- a/.github/workflows/secrets-scan.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Secrets Scan -on: - pull_request: - types: [opened, synchronize, reopened] -jobs: - security-secrets: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: '2' - ref: '${{ github.event.pull_request.head.ref }}' - - run: | - git reset --soft HEAD~1 - - name: Install Talisman - run: | - # Download Talisman - wget https://github.com/thoughtworks/talisman/releases/download/v1.37.0/talisman_linux_amd64 -O talisman - - # Checksum verification - checksum=$(sha256sum ./talisman | awk '{print $1}') - if [ "$checksum" != "8e0ae8bb7b160bf10c4fa1448beb04a32a35e63505b3dddff74a092bccaaa7e4" ]; then exit 1; fi - - # Make it executable - chmod +x talisman - - name: Run talisman - run: | - # Run Talisman with the pre-commit hook - ./talisman --githook pre-commit \ No newline at end of file diff --git a/.talismanrc b/.talismanrc index 684d117..d282969 100644 --- a/.talismanrc +++ b/.talismanrc @@ -10,3 +10,5 @@ fileignoreconfig: checksum: 5baabd7d2c391648163f9371f0e5e9484f8fb90fa2284cfc378732ec3192c193 - filename: src/endpoints.ts checksum: 721a1df93b02d04c1c19a76c171fe2748e4abb1fc3e43452e76fecfd8f384751 +- filename: package.json + checksum: 033eb21070795be5b426183f52d784347110fcb724bc9f8d63f94898ac5f0086 \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index 0773923..4beb650 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1,11 @@ -* @contentstack/security-admin \ No newline at end of file +* @contentstack/devex-pr-reviewers + +.github/workflows/sca-scan.yml @contentstack/security-admin + +.github/workflows/codeql-anaylsis.yml @contentstack/security-admin + +**/.snyk @contentstack/security-admin + +.github/workflows/policy-scan.yml @contentstack/security-admin + +.github/workflows/issues-jira.yml @contentstack/security-admin \ No newline at end of file diff --git a/package.json b/package.json index c40cdcc..f747970 100644 --- a/package.json +++ b/package.json @@ -21,11 +21,11 @@ "clear:reports": "rm -rf reports", "clear:badges": "rm -rf badges", "pretest": "npm run build", - "test": "npm run clear:reports && jest --ci --json --coverage --testLocationInResults --outputFile=./reports/report.json", + "test": "npm run clear:reports && pwd && jest --ci --json --coverage --testLocationInResults --outputFile=./reports/report.json", "test:badges": "npm run clear:badges && npm run test && jest-coverage-badges --input ./reports/coverage/coverage-summary.json --output ./badges", "test:debug": "jest --watchAll --runInBand", "prebuild": "rimraf dist && mkdir -p dist/lib && npm run download-regions", - "download-regions": "curl -s --max-time 30 --fail https://artifacts.contentstack.com/regions.json -o dist/lib/regions.json || echo 'Warning: Failed to download regions.json'", + "download-regions": "curl -v --max-time 30 --fail https://artifacts.contentstack.com/regions.json -o dist/lib/regions.json || echo 'Warning: Failed to download regions.json'", "build": "tsc && rollup -c", "format": "prettier --write \"src/**/*.ts\"", "prepare": "husky install && npm run build",