Skip to content

Staging back merge #347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jul 8, 2025
21 changes: 20 additions & 1 deletion .github/workflows/policy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,23 @@ jobs:
- uses: actions/checkout@master
- name: Checks for License file
run: |
if ! [[ -f "LICENSE" || -f "License.txt" || -f "LICENSE.md" || -f "LICENSE.txt" ]]; then exit 1; fi
expected_license_files=("LICENSE" "LICENSE.txt" "LICENSE.md" "License.txt")
license_file_found=false
current_year=$(date +"%Y")

for license_file in "${expected_license_files[@]}"; do
if [ -f "$license_file" ]; then
license_file_found=true
# check the license file for the current year, if not exists, exit with error
if ! grep -q "$current_year" "$license_file"; then
echo "License file $license_file does not contain the current year."
exit 2
fi
break
fi
done

if [ "$license_file_found" = false ]; then
echo "No license file found. Please add a license file to the repository."
exit 1
fi
29 changes: 29 additions & 0 deletions .github/workflows/secrets-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Secrets Scan
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
security-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '2'
ref: '${{ github.event.pull_request.head.ref }}'
- run: |
git reset --soft HEAD~1
- name: Install Talisman
run: |
# Download Talisman
wget https://github.com/thoughtworks/talisman/releases/download/v1.37.0/talisman_linux_amd64 -O talisman

# Checksum verification
checksum=$(sha256sum ./talisman | awk '{print $1}')
if [ "$checksum" != "8e0ae8bb7b160bf10c4fa1448beb04a32a35e63505b3dddff74a092bccaaa7e4" ]; then exit 1; fi

# Make it executable
chmod +x talisman
- name: Run talisman
run: |
# Run Talisman with the pre-commit hook
./talisman --githook pre-commit
2 changes: 2 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ fileignoreconfig:
checksum: 22c6a7fe4027d6b2c9adf0cbeb9c525ab79b15210b07ec5189693992e6800a66
- filename: test/typescript/stack.test.ts
checksum: 50b764c0ca6f6f27d7306a4e54327bef9b178e8436c6e3fad0d67d77343d10b3
- filename: .github/workflows/secrets-scan.yml
checksum: d79ec3f3288964f7d117b9ad319a54c0ebc152e35f69be8fde95522034fdfb2a
version: ""
Loading