You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use CSV annotations for fips compliance of a bundle
previously, the FIPS compliance tasks checked image labels to identify
if an operator bundle claims to be fips compliant. Not all product teams
include it as labels. A more robust way is to check the CSV annotations.
This commit implements that fix.
Refers to KONFLUX-6664
Signed-off-by: Yashvardhan Nanavati <[email protected]>
if ! echo "${subscription_label}" | grep -e "OpenShift Kubernetes Engine" -e "OpenShift Container Platform" -e "OpenShift Platform Plus"; then
131
130
echo "OpenShift Kubernetes Engine, OpenShift Platform Plus or OpenShift Container Platform are not present in operators.openshift.io/valid-subscription."
132
131
echo "Subscription labels are : $subscription_label"
133
-
if [ -z "${fips_label}" ] || [ "${fips_label}" != "true" ]; then
134
-
echo "The label features.operators.openshift.io/fips-compliant is also not set to true. Skipping the FIPS static check for ${bundle}"
132
+
if [ -z "${fips_annotation}" ] || [ "${fips_annotation}" != "true" ]; then
133
+
echo "The annotation features.operators.openshift.io/fips-compliant is also not set to true. Skipping the FIPS static check for ${bundle}"
135
134
continue
136
135
else
137
-
echo "The label features.operators.openshift.io/fips-compliant is set to true. Running the FIPS static check..."
136
+
echo "The annotation features.operators.openshift.io/fips-compliant is set to true. Running the FIPS static check..."
138
137
fi
139
138
else
140
139
echo "OpenShift Kubernetes Engine, OpenShift Platform Plus or OpenShift Container Platform are present in operators.openshift.io/valid-subscription. Running the FIPS static check..."
if ! echo "${subscription_label}" | grep -e "OpenShift Kubernetes Engine" -e "OpenShift Container Platform" -e "OpenShift Platform Plus"; then
128
127
echo "OpenShift Kubernetes Engine, OpenShift Platform Plus or OpenShift Container Platform are not present in operators.openshift.io/valid-subscription."
129
128
echo "Subscription labels are : $subscription_label"
130
-
if [ -z "${fips_label}" ] || [ "${fips_label}" != "true" ]; then
131
-
echo "The label features.operators.openshift.io/fips-compliant is also not set to true. Skipping the FIPS static check for ${bundle}"
129
+
if [ -z "${fips_annotation}" ] || [ "${fips_annotation}" != "true" ]; then
130
+
echo "The annotation features.operators.openshift.io/fips-compliant is also not set to true. Skipping the FIPS static check for ${bundle}"
132
131
continue
133
132
else
134
-
echo "The label features.operators.openshift.io/fips-compliant is set to true. Running the FIPS static check..."
133
+
echo "The annotation features.operators.openshift.io/fips-compliant is set to true. Running the FIPS static check..."
135
134
fi
136
135
else
137
136
echo "OpenShift Kubernetes Engine, OpenShift Platform Plus or OpenShift Container Platform are present in operators.openshift.io/valid-subscription. Running the FIPS static check..."
if ! echo "${subscription_label}" | grep -e "OpenShift Kubernetes Engine" -e "OpenShift Container Platform" -e "OpenShift Platform Plus"; then
84
84
echo "OpenShift Kubernetes Engine, OpenShift Platform Plus or OpenShift Container Platform are not present in operators.openshift.io/valid-subscription."
85
85
echo "Subscription labels are : $subscription_label"
86
-
if [ -z "${fips_label}" ] || [ "${fips_label}" != "true" ]; then
87
-
echo "The label features.operators.openshift.io/fips-compliant is also not set to true. Skipping the FIPS static check..."
86
+
if [ -z "${fips_annotation}" ] || [ "${fips_annotation}" != "true" ]; then
87
+
echo "The annotation features.operators.openshift.io/fips-compliant is also not set to true. Skipping the FIPS static check..."
88
88
exit 0
89
89
else
90
-
echo "The label features.operators.openshift.io/fips-compliant is set to true. Running the FIPS static check..."
90
+
echo "The annotation features.operators.openshift.io/fips-compliant is set to true. Running the FIPS static check..."
91
91
fi
92
92
else
93
93
echo "OpenShift Kubernetes Engine, OpenShift Platform Plus or OpenShift Container Platform are present in operators.openshift.io/valid-subscription. Running the FIPS static check..."
if ! echo "${subscription_label}" | grep -e "OpenShift Kubernetes Engine" -e "OpenShift Container Platform" -e "OpenShift Platform Plus"; then
69
69
echo "OpenShift Kubernetes Engine, OpenShift Platform Plus or OpenShift Container Platform are not present in operators.openshift.io/valid-subscription."
70
70
echo "Subscription labels are : $subscription_label"
71
-
if [ -z "${fips_label}" ] || [ "${fips_label}" != "true" ]; then
72
-
echo "The label features.operators.openshift.io/fips-compliant is also not set to true. Skipping the FIPS static check..."
71
+
if [ -z "${fips_annotation}" ] || [ "${fips_annotation}" != "true" ]; then
72
+
echo "The annotation features.operators.openshift.io/fips-compliant is also not set to true. Skipping the FIPS static check..."
73
73
exit 0
74
74
else
75
-
echo "The label features.operators.openshift.io/fips-compliant is set to true. Running the FIPS static check..."
75
+
echo "The annotation features.operators.openshift.io/fips-compliant is set to true. Running the FIPS static check..."
76
76
fi
77
77
else
78
78
echo "OpenShift Kubernetes Engine, OpenShift Platform Plus or OpenShift Container Platform are present in operators.openshift.io/valid-subscription. Running the FIPS static check..."
0 commit comments