Skip to content

Commit f87c836

Browse files
authored
Merge pull request #116 from OWASP/dep-update
2 parents 47bdb73 + e024fe6 commit f87c836

File tree

6 files changed

+786
-848
lines changed

6 files changed

+786
-848
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ aws/terraform.tfstate.backup
99
aws/.terraform.tfstate.lock.info
1010
aws/cluster-autoscaler-autodiscover.yaml
1111
aws/cluster-autoscaler-autodiscover.yaml-e
12+
scripts/unusedteams.txt
13+
scripts/users.csv
14+
scripts/teams.csv
1215
db.zip
1316
.idea
1417
.DS_Store

scripts/list-unused-ns.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ IFS=$'
1111
USERS=($(awk -F , '{print tolower($3)}' users.csv))
1212
TEAMS=($(awk -F , '{print tolower($3)}' teams.csv))
1313
unset IFS
14+
NAMESPACES=$(kubectl get ns | grep t- | awk '{print $1;}')
15+
count=0
1416
for NAMESPACE in `kubectl get ns | grep t- | awk '{print $1;}'`
1517
do
1618
echo "found $NAMESPACE"
1719
CUT_NAMESPACE=${NAMESPACE:2}
20+
let count++
1821
NO_TDASH_NAMESPACE=`echo $CUT_NAMESPACE | awk '{print tolower($0)}'`
1922
echo "checking list for $NO_TDASH_NAMESPACE"
2023
if [[ " ${USERS[*]} " =~ " ${NO_TDASH_NAMESPACE} " ]]; then
@@ -29,3 +32,5 @@ else
2932

3033
fi
3134
done
35+
unregistered=$(wc -l unusedteams.txt)
36+
echo "${count} namespaces active where not registered ${unregistered}"

0 commit comments

Comments
 (0)