Skip to content

Commit

Permalink
[RHPAM-3709] - CVE-2021-26291 rhpam-7-businesscentral-rhel8-container… (
Browse files Browse the repository at this point in the history
#419)

* [RHPAM-3709] - CVE-2021-26291 rhpam-7-businesscentral-rhel8-container: maven: Block repositories using http by default [rhpam-7]

Signed-off-by: spolti <[email protected]>

* remove scl option since rhscl still with maven 3.6

Signed-off-by: spolti <[email protected]>

* Update jboss/container/maven/38/default/module.yaml

Signed-off-by: spolti <[email protected]>
  • Loading branch information
spolti authored Nov 30, 2022
1 parent 640d645 commit 95d98da
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 4 deletions.
59 changes: 59 additions & 0 deletions jboss/container/maven/38/default/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
////
AUTOGENERATED FILE - this file was generated via ./gen_template_docs.py.
Changes to .adoc or HTML files may be overwritten! Please change the
generator or the input template (./*.jinja)
////
= link:./module.yaml[jboss.container.maven.38.bash]
:toc:
:toc-placement!:
:toclevels: 5
Provides Maven v3.8 capabilities to an image.
toc::[]
== Labels
The following labels will be defined on the image:
io.fabric8.s2i.version.maven:: 3.8
== Environment Variables
The following environment variables are used to configure the functionality provided by this module:
|=======================================================================
|Name |Description |Example
|=======================================================================
The following environment variables will be configured on the image:
|=======================================================================
|Name |Value
|JBOSS_CONTAINER_MAVEN_38_MODULE |/opt/jboss/container/maven/38/
|MAVEN_VERSION |3.8
|=======================================================================
== Resources
No additional resources will be installed through this module.
== RPM Packages
=== Installed RPM Packages
The following RPMs will be installed by this module:
* maven
=== RPM Package Repositories
No additional RPM package repositories are required to install listed RPMs.
== Modules
=== Included Modules
No additional modules will be installed through this module.
=== Module Repositories
No module repositories defined.
13 changes: 13 additions & 0 deletions jboss/container/maven/38/default/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e

# maven pulls in jdk17, so we need to remove them if another jdk is the default
if ! readlink /etc/alternatives/java | grep -q "java-17"; then
for pkg in java-17-openjdk-devel \
java-17-openjdk-headless \
java-17-openjdk; do
if rpm -q "$pkg"; then
rpm -e --nodeps "$pkg"
fi
done
fi
26 changes: 26 additions & 0 deletions jboss/container/maven/38/default/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
schema_version: 1
name: jboss.container.maven.38.bash
version: '3.8'
description: Provides Maven v3.8 capabilities to an image.

labels:
- name: io.fabric8.s2i.version.maven
value: "3.8"

envs:
- name: JBOSS_CONTAINER_MAVEN_38_MODULE
value: /opt/jboss/container/maven/38/
- name: MAVEN_VERSION
value: "3.8"

modules:
install:
- name: jboss.container.maven.module

packages:
install:
- maven

execute:
- script: configure.sh

2 changes: 1 addition & 1 deletion jboss/container/maven/default/bash/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ modules:
install:
- name: jboss.container.maven.api
- name: jboss.container.java.jvm.bash
- name: jboss.container.maven.36.bash
- name: jboss.container.maven.38.bash
- name: jboss.container.util.logging.bash
2 changes: 1 addition & 1 deletion jboss/container/maven/module/artifacts/maven.module
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[maven]
name=maven
stream=3.6
stream=3.8
profiles=
state=enabled
4 changes: 2 additions & 2 deletions jboss/container/maven/module/module.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
schema_version: 1
name: jboss.container.maven.module
version: '3.6'
version: '3.8'
description: ^
Enables the AppStream RPM Module for Maven 3.6 packages.
Enables the AppStream RPM Module for Maven 3.8 packages.

execute:
- script: configure.sh

0 comments on commit 95d98da

Please sign in to comment.