fullshield 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,3 @@
1
- import {existsSync,readFileSync}from'fs';import {join}from'path';function k(s,i={}){if(!i.experimental&&process.env.FULLSHIELD_EXPERIMENTAL_PLATFORM!=="1")return [];let e=join(s,"package.json");if(!existsSync(e))return [];try{let r=JSON.parse(readFileSync(e,"utf8"));if(Array.isArray(r.workspaces))return r.workspaces;if(Array.isArray(r.workspaces?.packages))return r.workspaces.packages}catch{return []}let t=join(s,"pnpm-workspace.yaml");return existsSync(t)?readFileSync(t,"utf8").split(`
2
- `).map(r=>r.replace(/^-+\s*/,"").trim()).filter(r=>r.length>0&&!r.startsWith("packages:")):[]}export{k as listWorkspaces};
1
+ import {existsSync,readFileSync,readdirSync}from'fs';import {join}from'path';function p(t){let e=join(t,"package.json");if(!existsSync(e))return [];try{let r=JSON.parse(readFileSync(e,"utf8"));if(Array.isArray(r.workspaces))return r.workspaces.filter(n=>typeof n=="string");if(Array.isArray(r.workspaces?.packages))return r.workspaces.packages.filter(n=>typeof n=="string")}catch{return []}let s=join(t,"pnpm-workspace.yaml");return existsSync(s)?readFileSync(s,"utf8").split(`
2
+ `).map(r=>r.replace(/^-+\s*/,"").trim()).filter(r=>r.length>0&&!r.startsWith("packages:")):[]}function g(t,e){let s=e.replace(/\\/g,"/").replace(/^\.\//,"");if(!s.includes("*"))return [s];let r=s.indexOf("/*");if(r<0)return [];let n=s.slice(0,r);try{return readdirSync(join(t,n),{withFileTypes:!0}).filter(i=>i.isDirectory()).map(i=>`${n}/${i.name}`).sort()}catch{return []}}function m(t){let e=new Set;for(let s of p(t))for(let r of g(t,s))r!==""&&r!=="."&&e.add(r);return e.size>1}function k(t,e={}){return !e.experimental&&process.env.FULLSHIELD_EXPERIMENTAL_PLATFORM!=="1"?[]:p(t)}
3
+ export{m as isMultiWorkspaceProject,k as listWorkspaces};
package/models/index.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "fullshieldVersion": "2.2.0",
2
+ "fullshieldVersion": "2.4.0",
3
3
  "entries": [
4
4
  {
5
5
  "package": "express",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fullshield",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "Full-cycle security scanner for Node.js/TypeScript backends: detect, classify, report, notify, fix, prevent.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,71 @@
1
+ name: 'FullShield Scan'
2
+ description: >-
3
+ Run fullshield scan, upload SARIF to code scanning, and optionally cache the
4
+ baseline. Does not post a pull-request comment, open issues, or phone home.
5
+ branding:
6
+ icon: shield
7
+ color: blue
8
+ inputs:
9
+ version:
10
+ description: 'Pinned fullshield npm version'
11
+ required: false
12
+ default: '2.4.0'
13
+ fail-on:
14
+ description: 'Minimum severity that fails the job'
15
+ required: false
16
+ default: 'high'
17
+ working-directory:
18
+ description: 'Directory to scan'
19
+ required: false
20
+ default: '.'
21
+ sarif-file:
22
+ description: 'SARIF output path'
23
+ required: false
24
+ default: 'fullshield.sarif'
25
+ baseline-path:
26
+ description: 'Baseline file path to cache'
27
+ required: false
28
+ default: '.fullshield-baseline.json'
29
+ cache-baseline:
30
+ description: 'Cache the baseline file between runs'
31
+ required: false
32
+ default: 'true'
33
+ upload-sarif:
34
+ description: 'Upload SARIF to GitHub code scanning when permissions allow'
35
+ required: false
36
+ default: 'true'
37
+ args:
38
+ description: 'Extra arguments appended to fullshield scan'
39
+ required: false
40
+ default: ''
41
+ runs:
42
+ using: composite
43
+ steps:
44
+ - name: Setup Node.js
45
+ uses: actions/setup-node@v7
46
+ with:
47
+ node-version: '22'
48
+ - name: Install fullshield@2.4.0
49
+ shell: bash
50
+ run: npm install --global fullshield@${{ inputs.version }}
51
+ - name: Cache FullShield baseline
52
+ if: inputs.cache-baseline == 'true'
53
+ uses: actions/cache@v4
54
+ with:
55
+ path: ${{ inputs.working-directory }}/${{ inputs.baseline-path }}
56
+ key: fullshield-baseline-${{ runner.os }}-${{ hashFiles(format('{0}/package-lock.json', inputs.working-directory), format('{0}/pnpm-lock.yaml', inputs.working-directory), format('{0}/yarn.lock', inputs.working-directory)) }}
57
+ restore-keys: |
58
+ fullshield-baseline-${{ runner.os }}-
59
+ - name: Scan
60
+ shell: bash
61
+ working-directory: ${{ inputs.working-directory }}
62
+ run: >
63
+ fullshield scan
64
+ --sarif "${{ inputs.sarif-file }}"
65
+ --fail-on "${{ inputs.fail-on }}"
66
+ ${{ inputs.args }}
67
+ - name: Upload SARIF
68
+ if: always() && inputs.upload-sarif == 'true'
69
+ uses: github/codeql-action/upload-sarif@v3
70
+ with:
71
+ sarif_file: ${{ inputs.working-directory }}/${{ inputs.sarif-file }}
@@ -0,0 +1,8 @@
1
+ {
2
+ "profile": "recommended",
3
+ "modules": ["deps", "secrets", "sast", "config"],
4
+ "failOn": "high",
5
+ "ignore": ["dist/**", "**/*.test.ts"],
6
+ "baseline": ".fullshield-baseline.json",
7
+ "notify": { "slackWebhookEnv": "FULLSHIELD_SLACK_WEBHOOK" }
8
+ }
@@ -0,0 +1,21 @@
1
+ name: FullShield
2
+ on:
3
+ pull_request:
4
+ push:
5
+ branches: [main]
6
+ permissions:
7
+ contents: read
8
+ security-events: write
9
+ jobs:
10
+ scan:
11
+ runs-on: ubuntu-24.04
12
+ steps:
13
+ - uses: actions/checkout@v7
14
+ # Pin this Action by commit SHA in your repo after copying templates/action/.
15
+ # Example Marketplace ref once published: kathanp/fullshield-action@<sha>
16
+ - uses: ./templates/action
17
+ with:
18
+ version: '2.4.0'
19
+ fail-on: high
20
+ cache-baseline: 'true'
21
+ upload-sarif: 'true'
@@ -0,0 +1,8 @@
1
+ {
2
+ "requiredModules": ["secrets", "deps", "sast", "config"],
3
+ "failOn": {
4
+ "main": "critical",
5
+ "*": "high"
6
+ },
7
+ "exceptions": []
8
+ }