-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e45503
commit d277be8
Showing
31 changed files
with
995 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.2.0 | ||
6.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
bash | ||
git | ||
github | ||
gitleaks | ||
shellcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
# Template: 1.0.0 | ||
name: "SAST / GitLeaks" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
push: | ||
branches: | ||
- "feature/**" | ||
|
||
jobs: | ||
sast-GitLeaks: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
|
||
- name: "Check out repository code" | ||
uses: "actions/checkout@main" | ||
|
||
- name: "Prepare environment" | ||
run: "./bin/dev-lib-base" | ||
|
||
- name: "Download tools" | ||
run: "./bin/dev-lib-gitleaks" | ||
|
||
- name: "Run SAST" | ||
run: "./bin/dev-sast-gitleaks" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env bash | ||
####################################### | ||
# Dev / Env / GitLeaks / Shared environment variables | ||
# | ||
# * Version: 1.0.0 | ||
# * Template: 1.0.1 | ||
# | ||
####################################### | ||
# Copyright [2023] [serdigital64@gmail.com] | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
####################################### | ||
|
||
# | ||
# Globals | ||
# | ||
# * Use .env file to override values | ||
# | ||
|
||
# shellcheck disable=SC2154 | ||
{ | ||
# Lib / GitLeaks / Installer | ||
export DEV_LIB_GITLEAKS_INSTALLER="${DEV_LIB_INSTALLER64_TARGET}/install-gitleaks" | ||
# Lib / GitLeaks / Target | ||
export DEV_LIB_GITLEAKS_TARGET="${DEV_LIB_GITLEAKS_TARGET:-${DEV_PATH_LIB}/gitleaks}" | ||
# Lib / GitLeaks / Version | ||
export DEV_LIB_GITLEAKS_VERSION="${DEV_LIB_GITLEAKS_VERSION:-v8.18.4}" | ||
# SAST / GitLeaks / Format | ||
export DEV_SAST_GITLEAKS_FORMAT="${DEV_SAST_GITLEAKS_FORMAT:-sarif}" | ||
} | ||
|
||
# | ||
# Locals | ||
# | ||
# * Use .local.env file or CICD variables to override values | ||
# | ||
|
||
# shellcheck disable=SC2154 | ||
{ | ||
# Lib / GitLeaks / Command | ||
export DEV_LIB_GITLEAKS_BIN="${DEV_LIB_GITLEAKS_BIN:-${DEV_LIB_GITLEAKS_TARGET}/gitleaks}" | ||
} | ||
|
||
# | ||
# Secrets | ||
# | ||
# * Use .secrets.env file or CICD secrets to override values | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env bash | ||
####################################### | ||
# Dev / Env / SysOp64 / Shared environment variables | ||
# | ||
# * Version: 1.0.0 | ||
# * Template: 1.0.1 | ||
# | ||
####################################### | ||
# Copyright [2023] [serdigital64@gmail.com] | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
####################################### | ||
|
||
# | ||
# Globals | ||
# | ||
# * Use .env file to override values | ||
# | ||
|
||
# shellcheck disable=SC2154 | ||
{ | ||
# Lib / SysOp64 / Installer | ||
export DEV_LIB_SYSOP64_INSTALLER="${DEV_LIB_INSTALLER64_TARGET}/install-sysop64" | ||
# Lib / SysOp64 / Target | ||
export DEV_LIB_SYSOP64_TARGET="${DEV_LIB_SYSOP64_TARGET:-${DEV_PATH_LIB}/so64}" | ||
} | ||
|
||
# | ||
# Locals | ||
# | ||
# * Use .local.env file or CICD variables to override values | ||
# | ||
|
||
# | ||
# Secrets | ||
# | ||
# * Use .secrets.env file or CICD secrets to override values | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/env bash | ||
# Template: 1.1.1 | ||
####################################### | ||
# Dev / Init | ||
# | ||
# * Use to initialize development environment | ||
# * Usage: source ./bin/dev-init [profile_name] | ||
# * To be run from the project's root directori | ||
# * Version: 1.0.0 | ||
# | ||
####################################### | ||
# Copyright [2023] [serdigital64@gmail.com] | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
####################################### | ||
|
||
# | ||
# Imports | ||
# | ||
|
||
DEV_PROFILE="${1:-${DEV_PROFILE}}" | ||
# shellcheck source=bin/dev-set | ||
source ./bin/dev-set || { echo 'dev-set:Error: unable to load dev environment' 2>&1 && return 1; } | ||
# shellcheck source-path=lib/bl64 | ||
source "${DEV_LIB_BASHLIB64_TARGET}/bashlib64-module-msg.bash" && | ||
source "${DEV_LIB_BASHLIB64_TARGET}/bashlib64-core.bash" || return 1 | ||
|
||
# | ||
# Functions | ||
# | ||
|
||
function dev_init_profile() { | ||
bl64_dbg_app_show_function | ||
[[ "${DEV_PROFILE}" == 'none' ]] && return 0 | ||
./bin/dev-profile-create | ||
} | ||
|
||
function dev_init_show() { | ||
bl64_dbg_app_show_function | ||
bl64_msg_show_info "Development environment initialized: | ||
Profile : ${DEV_PROFILE} | ||
Project Path : ${DEV_PATH_ROOT} | ||
Source Code Path : ${DEV_PATH_SRC} | ||
Staging area Path: ${DEV_PATH_BUILD} | ||
Tools Path : ${DEV_PATH_BIN}" | ||
} | ||
|
||
function dev_init_initialize() { | ||
bl64_dbg_app_show_function | ||
} | ||
|
||
# | ||
# Main | ||
# | ||
|
||
[[ -n "$DEV_CICD_DEBUG" ]] && bl64_dbg_all_enable | ||
|
||
bl64_msg_all_enable_verbose | ||
bl64_msg_show_batch_start 'dev-init' | ||
dev_init_initialize && | ||
dev_init_profile && | ||
dev_init_show && | ||
unset dev_init_initialize && | ||
unset dev_init_profile && | ||
unset dev_init_show | ||
bl64_msg_show_batch_finish $? 'dev-init' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.