-
Notifications
You must be signed in to change notification settings - Fork 0
Linking service #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
414af25
33f4416
d83af97
426d0e6
ee54e2e
b6ce3e5
5546ad7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
on: | ||
workflow_call: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-push: | ||
name: Build + Push Image | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: docker/metadata-action@v5 | ||
id: meta | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
target: production | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,45 @@ | ||
name: CI Pipeline | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
push: | ||
branches: | ||
- '**' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: super-linter/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TYPESCRIPT_DEFAULT_STYLE: prettier | ||
VALIDATE_DOCKERFILE_HADOLINT: false | ||
VALIDATE_JSCPD: false | ||
VALIDATE_PYTHON_FLAKE8: false | ||
VALIDATE_PYTHON_MYPY: false | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: super-linter/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TYPESCRIPT_DEFAULT_STYLE: prettier | ||
VALIDATE_DOCKERFILE_HADOLINT: false | ||
VALIDATE_JSCPD: false | ||
VALIDATE_PYTHON_FLAKE8: false | ||
VALIDATE_PYTHON_MYPY: false | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
- run: npm install --force | ||
- run: npm run test | ||
- uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: npm run test:cov | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
- run: npm install --force | ||
- run: npm run test | ||
- uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: npm run test:cov | ||
|
||
# build-push: | ||
# name: Build and Push Image | ||
# runs-on: ubuntu-latest | ||
# needs: [lint, test] | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: docker/setup-buildx-action@v3 | ||
# - uses: docker/login-action@v3 | ||
# with: | ||
# registry: ${{ env.REGISTRY }} | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
# - uses: docker/metadata-action@v5 | ||
# id: meta | ||
# with: | ||
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
# - uses: docker/build-push-action@v5 | ||
# with: | ||
# context: . | ||
# target: prod | ||
# push: true | ||
# tags: ${{ steps.meta.outputs.tags }} | ||
# labels: ${{ steps.meta.outputs.labels }} | ||
build-push: | ||
needs: [lint, test] | ||
uses: ./.github/workflows/build-push.yml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
version: "3.9" | ||
version: '3.9' | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
target: development | ||
dockerfile: Dockerfile | ||
environment: | ||
- NODE_ENV=development | ||
- PORT=3000 | ||
- GOOGLE_CLIENT_ID=x | ||
- GOOGLE_CLIENT_SECRET=y | ||
- GOOGLE_CALLBACK_URI=https://github.com/brocoders/nestjs-boilerplate/tree/main/src | ||
- DISCORD_CLIENT_ID=v | ||
- DISCORD_CLIENT_SECRET=b | ||
- DISCORD_CALLBACK_URI=https://github.com/brocoders/nestjs-boilerplate/tree/main/src | ||
- JWT_SECRET=t | ||
- LOG_LEVEL=trace | ||
ports: | ||
- "3000:3000" | ||
volumes: | ||
- ./coverage:/project/coverage | ||
app: | ||
build: | ||
context: . | ||
target: development | ||
dockerfile: Dockerfile | ||
environment: | ||
- NODE_ENV=development | ||
- PORT=3000 | ||
- DISCORD_CLIENT_ID=x | ||
- DISCORD_CLIENT_SECRET=-x | ||
- DISCORD_REDIRECT_URI=http://localhost:4000/api/v1/auth/discord/authenticate/callback | ||
- GOOGLE_CLIENT_ID=x | ||
- GOOGLE_CLIENT_SECRET=x | ||
- GOOGLE_REDIRECT_URI=http://localhost:4000/api/v1/auth/google/authenticate/callback | ||
- SESSION_SECRET=x | ||
- JWT_SECRET=x | ||
- WALLET_PRIVATE_KEY=0x85167e00aeed1db6a59945f1f78f997856e2e312cf4e55cde90b740b71f9808c | ||
- WALLET_PUBLIC_KEY=x | ||
- LOG_LEVEL=info | ||
- FRONTEND_URL=http://localhost:3000 | ||
- LIT_NETWORK=datil-dev | ||
|
||
ports: | ||
- '3000:3000' | ||
volumes: | ||
- ./coverage:/project/coverage |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
version: "3.9" | ||
version: '3.9' | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
target: prod | ||
dockerfile: Dockerfile | ||
environment: | ||
- NODE_ENV=production | ||
- PORT=3000 | ||
- GOOGLE_CLIENT_ID=x | ||
- GOOGLE_CLIENT_SECRET=y | ||
- GOOGLE_CALLBACK_URI=https://github.com/brocoders/nestjs-boilerplate/tree/main/src | ||
- DISCORD_CLIENT_ID=v | ||
- DISCORD_CLIENT_SECRET=b | ||
- DISCORD_CALLBACK_URI=https://github.com/brocoders/nestjs-boilerplate/tree/main/src | ||
- JWT_SECRET=t | ||
- LOG_LEVEL=trace | ||
volumes: | ||
- ./coverage:/project/coverage | ||
app: | ||
build: | ||
context: . | ||
target: production | ||
dockerfile: Dockerfile | ||
environment: | ||
- NODE_ENV=production | ||
- PORT=3000 | ||
- DISCORD_CLIENT_ID=x | ||
- DISCORD_CLIENT_SECRET=-x | ||
- DISCORD_REDIRECT_URI=x | ||
- GOOGLE_CLIENT_ID=x | ||
- GOOGLE_CLIENT_SECRET=x | ||
- GOOGLE_REDIRECT_URI=x | ||
- SESSION_SECRET=x | ||
- JWT_SECRET=x | ||
- WALLET_PRIVATE_KEY=0x85167e00aeed1db6a59945f1f78f997856e2e312cf4e55cde90b740b71f9808c | ||
- WALLET_PUBLIC_KEY=x | ||
|
||
- LOG_LEVEL=info | ||
- FRONTEND_URL=http://localhost:3000 | ||
- LIT_NETWORK=datil-dev | ||
volumes: | ||
- ./coverage:/project/coverage |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -1,21 +1,26 @@ | ||||||||||
version: "3.9" | ||||||||||
version: '3.9' | ||||||||||
|
||||||||||
services: | ||||||||||
app: | ||||||||||
build: | ||||||||||
context: . | ||||||||||
target: test | ||||||||||
dockerfile: Dockerfile | ||||||||||
environment: | ||||||||||
- NODE_ENV=test | ||||||||||
- PORT=3000 | ||||||||||
- GOOGLE_CLIENT_ID=x | ||||||||||
- GOOGLE_CLIENT_SECRET=y | ||||||||||
- GOOGLE_CALLBACK_URI=https://github.com/brocoders/nestjs-boilerplate/tree/main/src | ||||||||||
- DISCORD_CLIENT_ID=v | ||||||||||
- DISCORD_CLIENT_SECRET=b | ||||||||||
- DISCORD_CALLBACK_URI=https://github.com/brocoders/nestjs-boilerplate/tree/main/src | ||||||||||
- JWT_SECRET=t | ||||||||||
- LOG_LEVEL=trace | ||||||||||
volumes: | ||||||||||
- ./coverage:/project/coverage | ||||||||||
app: | ||||||||||
build: | ||||||||||
context: . | ||||||||||
target: test | ||||||||||
dockerfile: Dockerfile | ||||||||||
environment: | ||||||||||
- NODE_ENV=test | ||||||||||
- PORT=3000 | ||||||||||
- DISCORD_CLIENT_ID=x | ||||||||||
- DISCORD_CLIENT_SECRET=-x | ||||||||||
- DISCORD_REDIRECT_URI=http://localhost:4000/api/v1/auth/discord/authenticate/callback | ||||||||||
- GOOGLE_CLIENT_ID=x | ||||||||||
- GOOGLE_CLIENT_SECRET=x | ||||||||||
- GOOGLE_REDIRECT_URI=http://localhost:4000/api/v1/auth/google/authenticate/callback | ||||||||||
- SESSION_SECRET=x | ||||||||||
- JWT_SECRET=x | ||||||||||
- WALLET_PRIVATE_KEY=0x85167e00aeed1db6a59945f1f78f997856e2e312cf4e55cde90b740b71f9808c | ||||||||||
- WALLET_PUBLIC_KEY=x | ||||||||||
|
- WALLET_PRIVATE_KEY=0x85167e00aeed1db6a59945f1f78f997856e2e312cf4e55cde90b740b71f9808c | |
- WALLET_PUBLIC_KEY=x | |
- WALLET_PRIVATE_KEY=${WALLET_PRIVATE_KEY} | |
- WALLET_PUBLIC_KEY=${WALLET_PUBLIC_KEY} |
Tools
Gitleaks
20-21: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
{ | ||
"moduleFileExtensions": [ | ||
"js", | ||
"json", | ||
"ts" | ||
], | ||
"rootDir": ".", | ||
"testRegex": ".*\\.spec\\.ts$", | ||
"transform": { | ||
"^.+\\.(t|j)s$": "ts-jest" | ||
}, | ||
"collectCoverage": true, | ||
"collectCoverageFrom": [ | ||
"**/*.(t|j)s" | ||
], | ||
"coverageDirectory": "./coverage", | ||
"coverageReporters": [ | ||
"json", | ||
"lcov", | ||
"text", | ||
"clover", | ||
"html" | ||
], | ||
"testEnvironment": "node" | ||
} | ||
"moduleFileExtensions": ["js", "json", "ts"], | ||
"rootDir": ".", | ||
"testRegex": ".*\\.spec\\.ts$", | ||
"transform": { | ||
"^.+\\.(t|j)s$": "ts-jest" | ||
}, | ||
"collectCoverage": true, | ||
"collectCoverageFrom": ["src/**/*.ts*"], | ||
"coverageDirectory": "./coverage", | ||
"coverageReporters": ["json", "lcov", "text", "clover", "html"], | ||
"testEnvironment": "node" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Address potential security risk with WALLET keys.
The
WALLET_PRIVATE_KEY
andWALLET_PUBLIC_KEY
are detected as generic API keys. Ensure these are not hardcoded in production configurations and are securely managed.Committable suggestion
Tools
Gitleaks