Skip to content
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

[Snyk] Security upgrade vite from 4.5.1 to 4.5.5 #21

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
706b484
fix: upgrade tailwindcss from 3.3.3 to 3.4.4
snyk-bot Jul 27, 2024
2da9e8b
fix: upgrade autoprefixer from 10.4.16 to 10.4.19
snyk-bot Jul 27, 2024
9332863
Merge pull request #5 from abdulrahman305/snyk-upgrade-c76dc2d6ff18d2…
abdulrahman305 Jul 28, 2024
5243a15
Merge pull request #2 from abdulrahman305/snyk-upgrade-05e09ec3ee7474…
abdulrahman305 Jul 28, 2024
4f71e26
fix: upgrade @sveltejs/vite-plugin-svelte from 2.4.6 to 2.5.3
snyk-bot Jul 28, 2024
9078683
fix: upgrade vite from 4.5.1 to 4.5.3
snyk-bot Jul 28, 2024
cff87a8
Merge pull request #7 from abdulrahman305/snyk-upgrade-7afd865063f9c8…
abdulrahman305 Jul 28, 2024
9c922ac
Merge pull request #6 from abdulrahman305/snyk-upgrade-cbca5b661c62e7…
abdulrahman305 Jul 28, 2024
6ced28b
fix: upgrade svelte-markdown from 0.4.0 to 0.4.1
snyk-bot Jul 29, 2024
e8f0714
Merge pull request #8 from abdulrahman305/snyk-upgrade-876e3d2390e8c9…
abdulrahman305 Jul 30, 2024
82e102f
fix: upgrade tailwindcss from 3.3.3 to 3.4.5
snyk-bot Aug 6, 2024
00dbd02
Merge pull request #9 from abdulrahman305/snyk-upgrade-efec9ed3fd4fb2…
abdulrahman305 Aug 6, 2024
4e24f3b
Create files
abdulrahman305 Aug 6, 2024
4861f09
Merge pull request #10 from abdulrahman305/aks-devhub-iyuin
abdulrahman305 Aug 6, 2024
970bbd7
Create files
abdulrahman305 Aug 7, 2024
9abd485
Merge pull request #11 from abdulrahman305/aks-devhub-vznfc
abdulrahman305 Aug 7, 2024
26ac7fc
Create docker-image.yml
abdulrahman305 Aug 7, 2024
1573b05
fix: upgrade tailwindcss from 3.3.3 to 3.4.6
snyk-bot Aug 7, 2024
6237ba3
Merge pull request #12 from abdulrahman305/snyk-upgrade-9127d741bddaf…
abdulrahman305 Aug 11, 2024
f39ddb9
chore: Add .npmrc and package-lock.json files
abdulrahman305 Aug 11, 2024
fac2f59
chore: Add package-lock.json file
abdulrahman305 Aug 11, 2024
9adc99c
Bump torch from 2.0.1 to 2.2.0 in the pip group across 1 directory
dependabot[bot] Aug 14, 2024
f79b381
fix: upgrade tailwindcss from 3.3.3 to 3.4.7
snyk-bot Aug 15, 2024
1d0f66c
fix: upgrade postcss from 8.4.31 to 8.4.40
snyk-bot Aug 15, 2024
0a72854
Merge pull request #13 from abdulrahman305/dependabot/pip/pip-803b27037b
abdulrahman305 Aug 16, 2024
dddd2ab
Merge pull request #14 from abdulrahman305/snyk-upgrade-a0f490ee5e82d…
abdulrahman305 Aug 16, 2024
9d9a75f
Merge pull request #15 from abdulrahman305/snyk-upgrade-bb4c205badcb0…
abdulrahman305 Aug 16, 2024
062e39d
fix: upgrade postcss from 8.4.31 to 8.4.41
snyk-bot Aug 27, 2024
e888d2b
fix: upgrade tailwindcss from 3.3.3 to 3.4.8
snyk-bot Aug 29, 2024
211f9de
Merge pull request #18 from abdulrahman305/snyk-upgrade-3821ab165dd05…
abdulrahman305 Aug 30, 2024
5155a4e
Merge pull request #17 from abdulrahman305/snyk-upgrade-55bb085333c8d…
abdulrahman305 Aug 30, 2024
a4efc91
Create an auto-deploy file
abdulrahman305 Sep 18, 2024
d2e9db6
fix: front-end/package.json to reduce vulnerabilities
snyk-bot Sep 19, 2024
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
8 changes: 2 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
*
!*.py
!requirements.txt
!images/*
!front-end/*
front-end/node_modules/*
Dockerfile
charts/
66 changes: 66 additions & 0 deletions .github/workflows/Genstack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Genstack
"on":
push:
branches:
- main
workflow_dispatch: {}
env:
ACR_RESOURCE_GROUP: kubeops_group
AZURE_CONTAINER_REGISTRY: acrworkflow1722973530004
CLUSTER_NAME: kube
CLUSTER_RESOURCE_GROUP: kubeops_group
CONTAINER_NAME: image-workflow-1722973530004
DEPLOYMENT_MANIFEST_PATH: |
./front-end/package.json
./front-end/package-lock.json
./front-end/jsconfig.json
jobs:
buildImage:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
name: Azure login
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
- name: Build and push image to ACR
run: az acr build --image ${{ env.CONTAINER_NAME }}:${{ github.sha }} --registry ${{ env.AZURE_CONTAINER_REGISTRY }} -g ${{ env.ACR_RESOURCE_GROUP }} -f ./docker-compose.yml ./
deploy:
permissions:
actions: read
contents: read
id-token: write
runs-on: ubuntu-latest
needs:
- buildImage
steps:
- uses: actions/checkout@v3
- uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
name: Azure login
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
- uses: azure/use-kubelogin@v1
name: Set up kubelogin for non-interactive login
with:
kubelogin-version: v0.0.25
- uses: azure/aks-set-context@v3
name: Get K8s context
with:
admin: "false"
cluster-name: ${{ env.CLUSTER_NAME }}
resource-group: ${{ env.CLUSTER_RESOURCE_GROUP }}
use-kubelogin: "true"
- uses: Azure/k8s-deploy@v4
name: Deploys application
with:
action: deploy
images: ${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.CONTAINER_NAME }}:${{ github.sha }}
manifests: ${{ env.DEPLOYMENT_MANIFEST_PATH }}
namespace: namespace-workflow-1722973530004
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Trigger auto deployment for genai

# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/genai-AutoDeployTrigger-08802d17-3be0-4081-89af-8ab34c2110f5.yml'

# Allow manual trigger
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
id-token: write #This is required for requesting the OIDC JWT Token
contents: read #Required when GH token is used to authenticate with private repo

steps:
- name: Checkout to the branch
uses: actions/checkout@v2

- name: Azure Login
uses: azure/login@v1
with:
client-id: ${{ secrets.GENAI_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.GENAI_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.GENAI_AZURE_SUBSCRIPTION_ID }}

- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
_dockerfilePathKey_: _dockerfilePath_
registryUrl: hub.docker.com
registryUsername: ${{ secrets.GENAI_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.GENAI_REGISTRY_PASSWORD }}
containerAppName: genai
resourceGroup: kubeops_group
imageToBuild: hub.docker.com/genai:${{ github.sha }}
_buildArgumentsKey_: |
_buildArgumentsValues_


65 changes: 65 additions & 0 deletions .github/workflows/genstack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: genstack
"on":
push:
branches:
- main
workflow_dispatch: {}
env:
ACR_RESOURCE_GROUP: kubeops_group
AZURE_CONTAINER_REGISTRY: acrworkflow1723012492625
CLUSTER_NAME: kube
CLUSTER_RESOURCE_GROUP: kubeops_group
CONTAINER_NAME: image-workflow-1723012492625
DEPLOYMENT_MANIFEST_PATH: |
manifests/deployment.yaml
manifests/service.yaml
jobs:
buildImage:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
name: Azure login
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
- name: Build and push image to ACR
run: az acr build --image ${{ env.CONTAINER_NAME }}:${{ github.sha }} --registry ${{ env.AZURE_CONTAINER_REGISTRY }} -g ${{ env.ACR_RESOURCE_GROUP }} -f Dockerfile ./
deploy:
permissions:
actions: read
contents: read
id-token: write
runs-on: ubuntu-latest
needs:
- buildImage
steps:
- uses: actions/checkout@v3
- uses: azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2
name: Azure login
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
- uses: azure/use-kubelogin@v1
name: Set up kubelogin for non-interactive login
with:
kubelogin-version: v0.0.25
- uses: azure/aks-set-context@v3
name: Get K8s context
with:
admin: "false"
cluster-name: ${{ env.CLUSTER_NAME }}
resource-group: ${{ env.CLUSTER_RESOURCE_GROUP }}
use-kubelogin: "true"
- uses: Azure/k8s-deploy@v4
name: Deploys application
with:
action: deploy
images: ${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.CONTAINER_NAME }}:${{ github.sha }}
manifests: ${{ env.DEPLOYMENT_MANIFEST_PATH }}
namespace: aks-istio-system
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://packages.us-west-2.codecatalyst.aws/npm/Sauditech/mygit/Repository/
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.11-slim
ENV PORT 8000
EXPOSE 8000
WORKDIR /usr/src/app

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

ENTRYPOINT ["python"]
CMD ["app.py"]
12 changes: 6 additions & 6 deletions front-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.2",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.31",
"@sveltejs/vite-plugin-svelte": "^2.5.3",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.41",
"svelte": "^4.0.5",
"tailwindcss": "^3.3.3",
"vite": "^4.4.12"
"tailwindcss": "^3.4.8",
"vite": "^4.5.5"
},
"dependencies": {
"svelte-markdown": "^0.4.0"
"svelte-markdown": "^0.4.1"
}
}
24 changes: 24 additions & 0 deletions manifests/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: genstack
labels:
app: genstack
kubernetes.azure.com/generator: devhub
namespace: aks-istio-system
spec:
replicas: 1
selector:
matchLabels:
app: genstack
template:
metadata:
labels:
app: genstack
spec:
containers:
- name: genstack
image: acrworkflow1723012492625.azurecr.io/image-workflow-1723012492625:latest
imagePullPolicy: Always
ports:
- containerPort: 8000
1 change: 1 addition & 0 deletions manifests/graphrag
Submodule graphrag added at 073f65
6 changes: 6 additions & 0 deletions manifests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions manifests/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: genstack
namespace: aks-istio-system
labels:
kubernetes.azure.com/generator: devhub
spec:
type: LoadBalancer
selector:
app: genstack
ports:
- protocol: TCP
port: 8000
targetPort: 8000
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sentence_transformers==2.2.2
Pillow
fastapi
PyPDF2
torch==2.0.1
torch==2.2.0
pydantic
uvicorn
sse-starlette
Expand Down
Loading