@adversarylabs/sdk 0.1.3 → 0.1.5
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.
- package/LICENSE +21 -0
- package/README.md +68 -20
- package/dist/index.d.ts +69 -23
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +338 -143
- package/dist/index.js.map +1 -1
- package/package.json +20 -5
- package/schemas/adversary.review.v1.schema.json +136 -0
- package/templates/basic/.dockerignore +5 -0
- package/templates/basic/Dockerfile +11 -4
- package/templates/basic/README.md +3 -1
- package/templates/basic/adversary.yaml +1 -1
- package/templates/basic/npm-shrinkwrap.json +1364 -0
- package/templates/basic/package.json +4 -4
- package/templates/basic/src/index.ts +2 -1
- package/templates/basic/test/index.test.ts +0 -4
- package/schemas/adversary.findings.v1.schema.json +0 -80
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
FROM node:22-slim
|
|
1
|
+
FROM node:22-slim AS build
|
|
2
2
|
|
|
3
3
|
WORKDIR /app
|
|
4
|
-
COPY package
|
|
5
|
-
RUN npm
|
|
4
|
+
COPY package.json npm-shrinkwrap.json ./
|
|
5
|
+
RUN npm ci
|
|
6
6
|
COPY . .
|
|
7
7
|
RUN npm run build
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
FROM node:22-slim AS runtime
|
|
10
|
+
ENV NODE_ENV=production
|
|
11
|
+
WORKDIR /app
|
|
12
|
+
COPY package.json npm-shrinkwrap.json ./
|
|
13
|
+
RUN npm ci --omit=dev && npm cache clean --force
|
|
14
|
+
COPY --from=build /app/dist ./dist
|
|
15
|
+
USER node
|
|
16
|
+
CMD ["node", "dist/index.js"]
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
Minimal TypeScript Adversary built with `@adversarylabs/sdk`.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm
|
|
6
|
+
npm ci
|
|
7
7
|
npm test
|
|
8
8
|
npm run build
|
|
9
9
|
npm start
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
At runtime the adversary reads `/adversary/input.json` and writes `/adversary/output.json`.
|
|
13
|
+
The included informational finding is intentionally visible so a clean run demonstrates the full
|
|
14
|
+
SDK path; replace it with your own rules before publishing.
|