Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/4urcloud/Kexa into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanmathia committed Nov 20, 2023
2 parents 4825701 + 4604c4a commit 885a664
Show file tree
Hide file tree
Showing 17 changed files with 332 additions and 236 deletions.
49 changes: 37 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,43 @@ jobs:
- name: Run tests
run: npm run test

- name: Git Version
id: versioning
uses: codacy/[email protected]
with:
release-branch: main
dev-branch: dev
log-paths: Kexa/
minor-identifier: 'feat:'
major-identifier: 'break:'

- name: Set up version in file
run: echo "${{ steps.versioning.outputs.version }}" > VERSION

- name: Run extract Addon
run: npm run update

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39

- name: List all changed files
run: |
echo "## ${{ steps.versioning.outputs.version }}" >> CHANGELOG.md
echo "" >> CHANGELOG.md
echo "### Files added: ${{steps.changed-files.outputs.added_files_count}}" >> CHANGELOG.md
echo "" >> CHANGELOG.md
for file in ${{ steps.changed-files.outputs.added_files }}; do
echo "$file was added" >> CHANGELOG.md
echo "" >> CHANGELOG.md
done
echo "### Files changed: ${{steps.changed-files.outputs.all_changed_and_modified_files_count}}" >> CHANGELOG.md
echo "" >> CHANGELOG.md
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed" >> CHANGELOG.md
echo "" >> CHANGELOG.md
done
echo "" >> CHANGELOG.md
- name: commit changes
uses: EndBug/add-and-commit@v4
Expand All @@ -44,16 +79,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Git Version
id: versionning
uses: codacy/[email protected]
with:
release-branch: main
dev-branch: dev
log-paths: Kexa/
minor-identifier: 'feat:'
major-identifier: 'break:'

- name: Login to Docker Registry
uses: docker/login-action@v2
with:
Expand All @@ -67,10 +92,10 @@ jobs:
context: ./
push: true
tags: |
${{ secrets.DOCKER_REGISTRY_NAME}}/innovtech/kexa:${{ steps.versionning.outputs.version }}
${{ secrets.DOCKER_REGISTRY_NAME}}/innovtech/kexa:${{ steps.versioning.outputs.version }}
${{ secrets.DOCKER_REGISTRY_NAME}}/innovtech/kexa:latest
- name: Release
uses: ncipollo/release-action@v1
with:
tag: "${{ steps.versionning.outputs.version }}"
tag: "${{ steps.versioning.outputs.version }}"
59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# CHANGELOG

## 1.8.0-SNAPSHOT.51.f9fa354

### Files added: 2

CHANGELOG.md was added

VERSION was added

### Files changed: 5

CHANGELOG.md was changed

VERSION was changed

.github/workflows/ci.yml was changed

Kexa/services/updateCapability.service.ts was changed

package.json was changed


## 1.8.0-SNAPSHOT.53.56373d8

### Files added: 0

### Files changed: 10

Kexa/rules/Deployement.yaml was changed

Kexa/rules/Economy.yaml was changed

Kexa/rules/HTTPRules.yaml was changed

Kexa/rules/OperationalExcellence.yaml was changed

Kexa/rules/Performance.yaml was changed

Kexa/rules/PostDeployement.yaml was changed

Kexa/rules/PreDeployement.yaml was changed

Kexa/rules/Security.yaml was changed

Kexa/rules/driveRules.yaml was changed

Kexa/rules/rules-testing.yaml was changed


## 1.8.0-SNAPSHOT.55.c3f6d1b

### Files added: 0

### Files changed: 1

README.md was changed


20 changes: 10 additions & 10 deletions Kexa/rules/Deployement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
- level: 3
min: 1
rules:
- name: "Git repo check"
- name: "git-is-repository-private"
description: "this rules is to check if git repo is private"
applied: true
level: 0
Expand All @@ -56,7 +56,7 @@
- property: private
condition: EQUAL
value: true
- name: "Git_branch_protect"
- name: "git-is-branch-protectec"
description: "this rules is to check if git branch is protected"
applied: true
level: 0
Expand All @@ -71,8 +71,8 @@
- property : name
condition : EQUAL
value : master
- name: "http request date in body"
description : "date check"
- name: "http-request-date-in-body"
description : "request date in body"
applied: true
level: 0
cloudProvider: http
Expand All @@ -83,8 +83,8 @@
- property : body.date
condition : EQUAL
value : null
- name: "http request certificate"
description : "certificate check"
- name: "http-request-certificate"
description : "check if certificate is present"
applied: true
level: 0
cloudProvider: http
Expand All @@ -97,8 +97,8 @@
condition : DATE_INF
value : 0 0 0 0 0 0
date: "MMM DD HH:mm:ss YYYY GMT"
- name: "http request header"
description : "header check"
- name: "http-request-header"
description : "http requested header"
applied: true
level: 0
cloudProvider: http
Expand All @@ -108,7 +108,7 @@
condition : INCLUDE
value : "application/json"
#change the namespace name to your namespace
- name: namespace-exist-api-4urcloud
- name: "namespace-exist-api-4urcloud"
description : "this rules is to check if namespace exist and notifiable if exist"
applied: true
level: 0
Expand All @@ -119,7 +119,7 @@
condition : DIFFERENT
value : 4urcloudwebsitepublic
#change the namespace name to your namespace
- name: all-pods-running-kexawebsite
- name: "all-pods-running-kexawebsite"
description : "this rules is to check if all pods are running for a namespace"
applied: true
level: 2
Expand Down
10 changes: 5 additions & 5 deletions Kexa/rules/Economy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
- level: 3
min: 1
rules:
- name: VM-Reservation
- name: "check-vm-reservation"
description : "check if VM have a reservation"
applied: true
level: 0
Expand All @@ -59,8 +59,8 @@
conditions:
- property: priority
condition: REGEX
value: ^(reservation)$
- name: "azure-disk-orphan"
value: (?i)reservation
- name: "azure-is-disk-orphan"
description : "this rules is to check if disk is orphan"
applied: true
level: 1
Expand All @@ -70,7 +70,7 @@
- property : diskState
condition : DIFFERENT
value : Unattached
- name: aks-scaleSet
- name: "aks-has-scaleSet"
description : "check if aks have a scaleSet"
applied: true
level: 0
Expand All @@ -83,7 +83,7 @@
- property: scaleSetEvictionPolicy
condition: EQUAL
value: Delete
- name: "Orphan nsg"
- name: "azure-orphan-nsg"
description : "this rules is to check if nsg is orphan"
applied: true
level: 1
Expand Down
16 changes: 8 additions & 8 deletions Kexa/rules/HTTPRules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
- level: 3
min: 1
rules:
- name: "http request code"
description : "code check"
- name: "http-request-response-code"
description : "check for a specific response code"
applied: true
level: 0
cloudProvider: http
Expand All @@ -65,8 +65,8 @@
- property : code
condition : EQUAL
value : 201
- name: "http request date in body"
description : "date check"
- name: "http-request-date-in-body"
description : "check if date is in body"
applied: true
level: 0
cloudProvider: http
Expand All @@ -86,8 +86,8 @@
- property : code
condition : EQUAL
value : 201
- name: "http request certificate"
description : "certificate check"
- name: "http-request-certificate"
description : "request certificate"
applied: true
level: 0
cloudProvider: http
Expand All @@ -96,8 +96,8 @@
- property : certificate.issuer.CN
condition : EQUAL
value : "Kubernetes Ingress Controller Fake Certificate"
- name: "http request header"
description : "header check"
- name: "http-request-header"
description : "request header content"
applied: true
level: 0
cloudProvider: http
Expand Down
4 changes: 2 additions & 2 deletions Kexa/rules/OperationalExcellence.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
- level: 3
min: 1
rules:
- name: VirtualNetwork-subnet-count
- name: "azure-virtual-network-minimum-subnets"
description : "check if NSG have a minimum of subnets"
applied: true
level: 1
Expand All @@ -71,7 +71,7 @@
condition: DATE_INF
value: 0 0 0 0 0 2 0
date: "YYYY-MM-DDThh:mm:ss.SSSZ"
- name: "tagsvalue-check-for-expiration-date"
- name: "aws-tagsvalue-check-for-expiration-date"
description: "this rule is to check if tags contain an expiration date (separate with \"-\")"
applied: true
level: 1
Expand Down
2 changes: 1 addition & 1 deletion Kexa/rules/Performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
- level: 3
min: 1
rules:
- name: aks-scaleSet
- name: "aks-is-scaleset-down"
description : "check if aks have a scaleSet down"
applied: true
level: 0
Expand Down
12 changes: 6 additions & 6 deletions Kexa/rules/PostDeployement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
- level: 3
min: 1
rules:
- name: "http request date in body"
description : "date check"
- name: "http-request-date-in-body"
description : "request date in body"
applied: true
level: 0
cloudProvider: http
Expand All @@ -58,8 +58,8 @@
- property : body.date
condition : EQUAL
value : null
- name: "http request certificate"
description : "certificate check"
- name: "http-request-certificate"
description : "request certificate"
applied: true
level: 0
cloudProvider: http
Expand All @@ -72,8 +72,8 @@
condition : DATE_INF
value : 0 0 0 0 0 0
date: "MMM DD HH:mm:ss YYYY GMT"
- name: "http request header"
description : "header check"
- name: "http-request-header"
description : "request header content"
applied: true
level: 0
cloudProvider: http
Expand Down
6 changes: 3 additions & 3 deletions Kexa/rules/PreDeployement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
- level: 3
min: 1
rules:
- name: "Git repo check"
- name: "git-is-repository-private"
description: "this rules is to check if my git repo is private"
applied: true
level: 1
Expand All @@ -62,7 +62,7 @@
condition: EQUAL
#change the name with your repo name
value: 4urcloud/Kexa_website
- name: "Git_branch_protect"
- name: "git-is-branch-protected"
description: "this rules is to check if my git branch is protected"
applied: true
level: 1
Expand All @@ -81,7 +81,7 @@
- property : protected
condition : EQUAL
value : true
- name: alert-if-namespace-not-exist-api-4urcloud
- name: "kub-alert-if-namespace-not-exist"
description : "this rules is to check if namespace exist and notifiable if not"
applied: true
level: 0
Expand Down
6 changes: 3 additions & 3 deletions Kexa/rules/Security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
- level: 3
min: 1
rules:
- name: NSG-subnet
- name: "azure-nsg-valid-subnet"
description : "check if NSG have a valid subnet"
applied: true
level: 1
Expand All @@ -60,7 +60,7 @@
- property: agentPoolProfiles
condition: COUNT
value: 2
- name: Git-repo-private
- name: "git-is-repository-private"
description: "this rules is to check if git repo is private"
applied: true
level: 0
Expand All @@ -70,7 +70,7 @@
- property: private
condition: EQUAL
value: true
- name: Git-branch-protect
- name: "git-is-branch-protected"
description: "this rules is to check if git branch is protected"
applied: true
level: 0
Expand Down
Loading

0 comments on commit 885a664

Please sign in to comment.