Skip to content

Commit

Permalink
Merge pull request #12 from ruromero/onguard-rename
Browse files Browse the repository at this point in the history
refactor: rename to onguard
  • Loading branch information
ruromero authored Jan 23, 2024
2 parents 237796f + 78b6948 commit 653637d
Show file tree
Hide file tree
Showing 52 changed files with 134 additions and 135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/RHEcosystemAppEng/exhort-cve-service?rev={{revision}}
build.appstudio.openshift.io/repo: https://github.com/RHEcosystemAppEng/onguard?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
Expand All @@ -12,9 +12,9 @@ metadata:
creationTimestamp: null
labels:
appstudio.openshift.io/application: exhort
appstudio.openshift.io/component: exhort-cve-service
appstudio.openshift.io/component: onguard
pipelines.appstudio.openshift.io/type: build
name: exhort-cve-service-on-pull-request
name: onguard-on-pull-request
namespace: trusted-content-tenant
spec:
params:
Expand All @@ -25,7 +25,7 @@ spec:
- name: image-expires-after
value: 5d
- name: output-image
value: quay.io/redhat-user-workloads/trusted-content-tenant/exhort/exhort-cve-service:on-pr-{{revision}}
value: quay.io/redhat-user-workloads/trusted-content-tenant/exhort/onguard:on-pr-{{revision}}
- name: path-context
value: .
- name: revision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
annotations:
build.appstudio.openshift.io/repo: https://github.com/RHEcosystemAppEng/exhort-cve-service?rev={{revision}}
build.appstudio.openshift.io/repo: https://github.com/RHEcosystemAppEng/onguard?rev={{revision}}
build.appstudio.redhat.com/commit_sha: '{{revision}}'
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "3"
Expand All @@ -11,9 +11,9 @@ metadata:
creationTimestamp: null
labels:
appstudio.openshift.io/application: exhort
appstudio.openshift.io/component: exhort-cve-service
appstudio.openshift.io/component: onguard
pipelines.appstudio.openshift.io/type: build
name: exhort-cve-service-on-push
name: onguard-on-push
namespace: trusted-content-tenant
spec:
params:
Expand All @@ -22,7 +22,7 @@ spec:
- name: git-url
value: '{{repo_url}}'
- name: output-image
value: quay.io/redhat-user-workloads/trusted-content-tenant/exhort/exhort-cve-service:{{revision}}
value: quay.io/redhat-user-workloads/trusted-content-tenant/exhort/onguard:{{revision}}
- name: path-context
value: .
- name: revision
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# exhort-cve-service
# ONGuard

This project uses Quarkus, the Supersonic Subatomic Java Framework.

Expand Down Expand Up @@ -43,7 +43,7 @@ Or, if you don't have GraalVM installed, you can run the native executable build
./mvnw package -Pnative -Dquarkus.native.container-build=true
```

You can then execute your native executable with: `./target/exhort-cve-service-1.0.0-SNAPSHOT-runner`
You can then execute your native executable with: `./target/onguard-1.0.0-SNAPSHOT-runner`

If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.

Expand Down
2 changes: 1 addition & 1 deletion deploy/git-job-image/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euo pipefail
WORKDIR=${WORKDIR:-./work}
REPO_PATH=${REPO_PATH:-./repo}/cvelistV5
REPO_URL=${REPO_URL:-https://github.com/CVEProject/cvelistV5.git}
SERVICE_ENDPOINT=${SERVICE_ENDPOINT:-http://exhort-cve-service:8080}
SERVICE_ENDPOINT=${SERVICE_ENDPOINT:-http://onguard:8080}

declare -a buffer=()

Expand Down
18 changes: 9 additions & 9 deletions deploy/exhort-cve-service.yaml → deploy/onguard.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: exhort-cve-service
name: onguard
labels:
app: exhort-cve-service
app: onguard
spec:
replicas: 1
selector:
matchLabels:
app: exhort-cve-service
app: onguard
template:
metadata:
labels:
app: exhort-cve-service
app: onguard
spec:
containers:
- name: exhort-cve-service
image: exhort-cve-service:latest
- name: onguard
image: onguard:latest
imagePullPolicy: IfNotPresent
ports:
- name: http
Expand Down Expand Up @@ -60,9 +60,9 @@ spec:
apiVersion: v1
kind: Service
metadata:
name: exhort-cve-service
name: onguard
labels:
app: exhort-cve-service
app: onguard
spec:
ports:
- name: http
Expand All @@ -74,4 +74,4 @@ spec:
protocol: TCP
targetPort: 9000
selector:
app: exhort-cve-service
app: onguard
16 changes: 8 additions & 8 deletions deploy/openshift/template.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
kind: Template
apiVersion: template.openshift.io/v1
metadata:
name: exhort-cve-service
name: onguard
labels:
template: exhort-cve-service
template: onguard
objects:
- kind: ServiceAccount
apiVersion: v1
Expand Down Expand Up @@ -179,7 +179,7 @@ parameters:
- name: APP_NAME
displayName: Application name
description: Application name
value: exhort-cve-service
value: onguard
required: true
- name: REPLICAS
displayName: Replicas
Expand All @@ -189,7 +189,7 @@ parameters:
- name: IMAGE
displayName: Container image name
description: Container image name
value: quay.io/ecosystem-appeng/exhort-cve-service
value: quay.io/ecosystem-appeng/onguard
required: true
- name: IMAGE_TAG
displayName: Container image tag
Expand All @@ -199,7 +199,7 @@ parameters:
- name: SERVICE_ACCOUNT_NAME
displayName: ServiceAccount name
description: The name of the ServiceAccount to use to run this pod.
value: exhort-cve-service-sa
value: onguard-sa
- name: ELASTICACHE_SECRET
displayName: Elasticache Secret
description: Name of the secret containing the Elasticache settings
Expand All @@ -208,7 +208,7 @@ parameters:
- name: SERVICE_NAME
displayName: Service name
description: Service name
value: exhort-cve-service
value: onguard
required: true
- name: SERVICE_PORT
displayName: Service port
Expand Down Expand Up @@ -245,8 +245,8 @@ parameters:
displayName: Environment (default -- stage)
description: 'Application environment'
- name: PROJECT_NAME
value: trusted-content-exhort-cve-service-stage
displayName: Project name (default -- trusted-content-exhort-cve-service-stage)
value: trusted-content-onguard-stage
displayName: Project name (default -- trusted-content-onguard-stage)
description: 'Project name'
- name: BACKSTAGE_PLUGIN_SA
displayName: Backstage ServiceAccount name
Expand Down
12 changes: 6 additions & 6 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
schemaVersion: 2.2.0
metadata:
name: exhort-cve-service
name: onguard
version: 1.0.0
provider: Red Hat
supportUrl: https://github.com/RHEcosystemAppEng/exhort-cve-service/issues
website: https://github.com/RHEcosystemAppEng/exhort-cve-service
displayName: Exhort CVE Service
description: Exhort CVE Service that aggregates data from OSV and NVD
supportUrl: https://github.com/RHEcosystemAppEng/onguard/issues
website: https://github.com/RHEcosystemAppEng/onguard
displayName: ONGUard
description: ONGuard Service that aggregates data from OSV and NVD
tags:
- Exhort
- RHTPA
Expand All @@ -22,7 +22,7 @@ parent:
components:
- name: image-build
image:
imageName: exhort-cve-service:latest
imageName: onguard:latest
dockerfile:
uri: src/main/docker/Dockerfile.multi-stage
buildContext: .
Expand Down
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.redhat.ecosystemappeng.exhort.cve</groupId>
<artifactId>exhort-cve-service</artifactId>
<groupId>com.redhat.ecosystemappeng.onguard</groupId>
<artifactId>onguard</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Exhort CVE Service</name>
<description>Red Hat Trusted Profile Analyser :: Exhort :: Exhort CVE Service</description>
<url>https://github.com/RHEcosystemAppEng/exhort-cve-service</url>
<name>ONGuard</name>
<description>Red Hat Trusted Profile Analyser :: Exhort :: ONGuard</description>
<url>https://github.com/RHEcosystemAppEng/onguard</url>
<inceptionYear>2024</inceptionYear>

<properties>
Expand Down Expand Up @@ -43,13 +43,13 @@

<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/RHEcosystemAppEng/exhort-cve-service/issues</url>
<url>https://github.com/RHEcosystemAppEng/onguard/issues</url>
</issueManagement>

<scm>
<url>https://github.com/RHEcosystemAppEng/exhort-cve-service</url>
<connection>scm:git:git@github.com:RHEcosystemAppEng/exhort-cve-service.git</connection>
<developerConnection>scm:git:git@github.com:RHEcosystemAppEng/exhort-cve-service.git</developerConnection>
<url>https://github.com/RHEcosystemAppEng/onguard</url>
<connection>scm:git:git@github.com:RHEcosystemAppEng/onguard.git</connection>
<developerConnection>scm:git:git@github.com:RHEcosystemAppEng/onguard.git</developerConnection>
<tag>HEAD</tag>
</scm>

Expand Down
6 changes: 3 additions & 3 deletions src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/exhort-cve-service-jvm .
# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/onguard-jvm .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/exhort-cve-service-jvm
# docker run -i --rm -p 8080:8080 quarkus/onguard-jvm
#
# If you want to include the debug port into your docker image
# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005.
Expand All @@ -20,7 +20,7 @@
#
# Then run the container using :
#
# docker run -i --rm -p 8080:8080 quarkus/exhort-cve-service-jvm
# docker run -i --rm -p 8080:8080 quarkus/onguard-jvm
#
# This image uses the `run-java.sh` script to run the application.
# This scripts computes the command line to execute your Java application, and
Expand Down
6 changes: 3 additions & 3 deletions src/main/docker/Dockerfile.legacy-jar
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/exhort-cve-service-legacy-jar .
# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/onguard-legacy-jar .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/exhort-cve-service-legacy-jar
# docker run -i --rm -p 8080:8080 quarkus/onguard-legacy-jar
#
# If you want to include the debug port into your docker image
# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005.
Expand All @@ -20,7 +20,7 @@
#
# Then run the container using :
#
# docker run -i --rm -p 8080:8080 quarkus/exhort-cve-service-legacy-jar
# docker run -i --rm -p 8080:8080 quarkus/onguard-legacy-jar
#
# This image uses the `run-java.sh` script to run the application.
# This scripts computes the command line to execute your Java application, and
Expand Down
10 changes: 5 additions & 5 deletions src/main/docker/Dockerfile.multi-stage
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ RUN ./mvnw package -B -Pnative -DskipTests=true
## Stage 2 : create the docker final image
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.3

LABEL description="Red Hat Trusted Profile Analyzer - Exhort CVE Service"
LABEL io.k8s.description="Red Hat Trusted Profile Analyzer - Exhort CVE Service"
LABEL io.k8s.display-name="RHTPA Exhort CVE Service"
LABEL io.openshift.tags="rhtpa exhort cve service"
LABEL summary="The RHTPA Exhort CVE exposes an API for retrieving vulnerability data \
LABEL description="Red Hat Trusted Profile Analyzer - ONGuard Service"
LABEL io.k8s.description="Red Hat Trusted Profile Analyzer - ONGuard Service"
LABEL io.k8s.display-name="RHTPA ONGuard service"
LABEL io.openshift.tags="rhtpa exhort onguard"
LABEL summary="The RHTPA ONGuard Service exposes an API for retrieving vulnerability data \
from OSV and NVD databases"

WORKDIR /work/
Expand Down
4 changes: 2 additions & 2 deletions src/main/docker/Dockerfile.native
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native -t quarkus/exhort-cve-service .
# docker build -f src/main/docker/Dockerfile.native -t quarkus/onguard .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/exhort-cve-service
# docker run -i --rm -p 8080:8080 quarkus/onguard
#
###
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.3
Expand Down
4 changes: 2 additions & 2 deletions src/main/docker/Dockerfile.native-micro
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/exhort-cve-service .
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/onguard .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/exhort-cve-service
# docker run -i --rm -p 8080:8080 quarkus/onguard
#
###
FROM quay.io/quarkus/quarkus-micro-image:2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.redhat.ecosystemappeng.exhort.cve.model;
package com.redhat.ecosystemappeng.onguard.model;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.redhat.ecosystemappeng.exhort.cve.model;
package com.redhat.ecosystemappeng.onguard.model;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.redhat.ecosystemappeng.exhort.cve.model;
package com.redhat.ecosystemappeng.onguard.model;

import java.util.Date;
import java.util.List;

import com.redhat.ecosystemappeng.exhort.cve.model.nvd.Metrics;
import com.redhat.ecosystemappeng.exhort.cve.model.osv.Affected;
import com.redhat.ecosystemappeng.exhort.cve.service.cve.CveFileService;
import com.redhat.ecosystemappeng.onguard.model.nvd.Metrics;
import com.redhat.ecosystemappeng.onguard.model.osv.Affected;
import com.redhat.ecosystemappeng.onguard.service.cve.CveFileService;

public record Vulnerability(
List<String> aliases,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.redhat.ecosystemappeng.exhort.cve.model.nvd;
package com.redhat.ecosystemappeng.onguard.model.nvd;

public record CvssData(String version, String vectorString, String attackVector, String attackComplexity,
String privilegesRequired, String userInteraction, String scope, String confidentialityImpact,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.redhat.ecosystemappeng.exhort.cve.model.nvd;
package com.redhat.ecosystemappeng.onguard.model.nvd;

public record Cvss_V2(String source, String type, CvssData cvssData, String baseSeverity, Float exploitabilityScore,
Float impactScore, Boolean acInsufInfo, Boolean obtainAllPrivilege, Boolean obtainUserPrivilege,
Expand Down
Loading

0 comments on commit 653637d

Please sign in to comment.