Skip to content

Commit 991ff74

Browse files
Initial setup
0 parents  commit 991ff74

File tree

85 files changed

+9917
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+9917
-0
lines changed

.dockerignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# /********************************************************************************
2+
# * Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
3+
# *
4+
# * See the NOTICE file(s) distributed with this work for additional
5+
# * information regarding copyright ownership.
6+
# *
7+
# * This program and the accompanying materials are made available under the
8+
# * terms of the Apache License, Version 2.0 which is available at
9+
# * https://www.apache.org/licenses/LICENSE-2.0.
10+
# *
11+
# * Unless required by applicable law or agreed to in writing, software
12+
# * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
# * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
# * License for the specific language governing permissions and limitations
15+
# * under the License.
16+
# *
17+
# * SPDX-License-Identifier: Apache-2.0
18+
# ********************************************************************************/
19+
20+
**/.git
21+
build/test-results

.editorconfig

Lines changed: 533 additions & 0 deletions
Large diffs are not rendered by default.

.github/dependabot.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for Maven
4+
- package-ecosystem: "gradle"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
open-pull-requests-limit: 5
9+
- package-ecosystem: "gradle"
10+
directory: "/ss-api"
11+
schedule:
12+
interval: "weekly"
13+
open-pull-requests-limit: 5
14+
- package-ecosystem: "gradle"
15+
directory: "/ss-dao"
16+
schedule:
17+
interval: "weekly"
18+
open-pull-requests-limit: 5
19+
- package-ecosystem: "gradle"
20+
directory: "/ss-service-impl"
21+
schedule:
22+
interval: "weekly"
23+
open-pull-requests-limit: 5
24+
- package-ecosystem: "gradle"
25+
directory: "/ss-service"
26+
schedule:
27+
interval: "weekly"
28+
open-pull-requests-limit: 5
29+
- package-ecosystem: "gradle"
30+
directory: "/ss-web"
31+
schedule:
32+
interval: "weekly"
33+
open-pull-requests-limit: 5
34+
35+
# Maintain dependencies for GitHub Actions
36+
- package-ecosystem: "github-actions"
37+
directory: "/"
38+
schedule:
39+
interval: "weekly"
40+
open-pull-requests-limit: 5
41+
42+
# Maintain dependencies for Docker
43+
- package-ecosystem: "docker"
44+
directory: "/"
45+
schedule:
46+
interval: "weekly"
47+
open-pull-requests-limit: 5

.github/workflows/codeql.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
schedule:
20+
- cron: '29 17 * * 2'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
32+
permissions:
33+
# required for all workflows
34+
security-events: write
35+
36+
# required to fetch internal or private CodeQL packs
37+
packages: read
38+
39+
# only required for workflows in private repositories
40+
actions: read
41+
contents: read
42+
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
include:
47+
- language: java-kotlin
48+
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
49+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
50+
# Use `c-cpp` to analyze code written in C, C++ or both
51+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
52+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
53+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
54+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
55+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
56+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
57+
steps:
58+
- name: Checkout repository
59+
uses: actions/checkout@v4
60+
61+
# Initializes the CodeQL tools for scanning.
62+
- name: Initialize CodeQL
63+
uses: github/codeql-action/init@v3
64+
with:
65+
languages: ${{ matrix.language }}
66+
build-mode: ${{ matrix.build-mode }}
67+
# If you wish to specify custom queries, you can do so here or in a config file.
68+
# By default, queries listed here will override any specified in a config file.
69+
# Prefix the list here with "+" to use these queries and those in the config file.
70+
71+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
72+
# queries: security-extended,security-and-quality
73+
74+
# If the analyze step fails for one of the languages you are analyzing with
75+
# "We were unable to automatically build your code", modify the matrix above
76+
# to set the build mode to "manual" for that language. Then modify this step
77+
# to build your code.
78+
# ℹ️ Command-line programs to run using the OS shell.
79+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
80+
- if: matrix.build-mode == 'manual'
81+
shell: bash
82+
run: |
83+
echo 'If you are using a "manual" build mode for one or more of the' \
84+
'languages you are analyzing, replace this with the commands to build' \
85+
'your code, for example:'
86+
echo ' make bootstrap'
87+
echo ' make release'
88+
exit 1
89+
90+
- name: Perform CodeQL Analysis
91+
uses: github/codeql-action/analyze@v3
92+
with:
93+
category: "/language:${{matrix.language}}"

.github/workflows/snyk-security.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# A sample workflow which sets up Snyk to analyze the full Snyk platform (Snyk Open Source, Snyk Code,
7+
# Snyk Container and Snyk Infrastructure as Code)
8+
# The setup installs the Snyk CLI - for more details on the possible commands
9+
# check https://docs.snyk.io/snyk-cli/cli-reference
10+
# The results of Snyk Code are then uploaded to GitHub Security Code Scanning
11+
#
12+
# In order to use the Snyk Action you will need to have a Snyk API token.
13+
# More details in https://github.com/snyk/actions#getting-your-snyk-token
14+
# or you can signup for free at https://snyk.io/login
15+
#
16+
# For more examples, including how to limit scans to only high-severity issues
17+
# and fail PR checks, see https://github.com/snyk/actions/
18+
19+
name: Snyk Security
20+
21+
on:
22+
push:
23+
branches: ["main" ]
24+
pull_request:
25+
branches: ["main"]
26+
27+
permissions:
28+
contents: read
29+
30+
jobs:
31+
snyk:
32+
permissions:
33+
contents: read # for actions/checkout to fetch code
34+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
35+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Set up Snyk CLI to check for security issues
40+
# Snyk can be used to break the build when it detects security issues.
41+
# In this case we want to upload the SAST issues to GitHub Code Scanning
42+
uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb
43+
44+
# For Snyk Open Source you must first set up the development environment for your application's dependencies
45+
# For example for Node
46+
#- uses: actions/setup-node@v3
47+
# with:
48+
# node-version: 16
49+
50+
env:
51+
# This is where you will need to introduce the Snyk API token created with your Snyk account
52+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
53+
54+
# Runs Snyk Code (SAST) analysis and uploads result into GitHub.
55+
# Use || true to not fail the pipeline
56+
- name: Snyk Code test
57+
run: snyk code test --sarif > snyk-code.sarif # || true
58+
59+
# Runs Snyk Open Source (SCA) analysis and uploads result to Snyk.
60+
- name: Snyk Open Source monitor
61+
run: snyk monitor --all-projects
62+
63+
# Runs Snyk Infrastructure as Code (IaC) analysis and uploads result to Snyk.
64+
# Use || true to not fail the pipeline.
65+
- name: Snyk IaC test and report
66+
run: snyk iac test --report # || true
67+
68+
# Build the docker image for testing
69+
- name: Build a Docker image
70+
run: docker build -t your/image-to-test .
71+
# Runs Snyk Container (Container and SCA) analysis and uploads result to Snyk.
72+
- name: Snyk Container monitor
73+
run: snyk container monitor your/image-to-test --file=Dockerfile
74+
75+
# Push the Snyk Code results into GitHub Code Scanning tab
76+
- name: Upload result to GitHub Code Scanning
77+
uses: github/codeql-action/upload-sarif@v2
78+
with:
79+
sarif_file: snyk-code.sarif

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
HELP.md
2+
.gradle
3+
build/
4+
!gradle/wrapper/gradle-wrapper.jar
5+
!**/src/main/**/build/
6+
!**/src/test/**/build/
7+
Pl
8+
### STS ###
9+
.apt_generated
10+
.classpath
11+
.factorypath
12+
.project
13+
.settings
14+
.springBeans
15+
.sts4-cache
16+
bin/
17+
!**/src/main/**/bin/
18+
!**/src/test/**/bin/
19+
20+
### IntelliJ IDEA ###
21+
.idea
22+
*.iws
23+
*.iml
24+
*.ipr
25+
out/
26+
!**/src/main/**/out/
27+
!**/src/test/**/out/
28+
29+
### NetBeans ###
30+
/nbproject/private/
31+
/nbbuild/
32+
/dist/
33+
/nbdist/
34+
/.nb-gradle/
35+
36+
### VS Code ###
37+
.vscode/

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
repos:
2+
- repo: https://github.com/Yelp/detect-secrets
3+
rev: v1.4.0
4+
hooks:
5+
- id: detect-secrets
6+
exclude: charts/*

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM gradle:8.10.2-jdk21-alpine AS build
2+
COPY --chown=gradle:gradle . /home/app
3+
WORKDIR /home/app
4+
RUN gradle clean build --no-daemon -i -x test -x javadoc
5+
6+
FROM eclipse-temurin:21-jre-alpine
7+
COPY --from=build /home/app/chat-web/build/libs/chat-web.jar /usr/local/lib/edc-chat/app.jar
8+
RUN apk update && apk upgrade libssl3 libcrypto3
9+
RUN addgroup -S edc-chat && adduser -S edc-chat -G edc-chat
10+
USER edc-chat
11+
WORKDIR /usr/local/lib/edc-chat
12+
EXPOSE 8080
13+
ENTRYPOINT ["java","-jar","app.jar"]

0 commit comments

Comments
 (0)