Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/secret-files-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Secret files check

# Zachytí verzované soubory s klíči a tajemstvími, které GitHub secret scanning
# nevidí (binární keystory .p12/.pfx/.jks, .env, privátní klíče). ADR 008.
# Vypisuje jen CESTY souborů, nikdy jejich obsah.

on:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]

jobs:
secret-files:
name: Secret files check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Verzované soubory s klíči a tajemstvími
shell: bash
run: |
set -u
bad=0
# 1) Podle názvu souboru: .env a binární keystory (šablony .example/.sample/.template/.dist jsou povolené).
# Soubory .pem/.key se posuzují jen podle obsahu (krok 2), protože mohou nést i veřejné certifikáty.
names=$(git ls-files | grep -Ei '(^|/)(\.env(\.[A-Za-z0-9_-]+)?|[^/]*\.(p12|pfx|jks|keystore))$' \
| grep -Eiv '\.(example|sample|template|dist)$' || true)
if [ -n "$names" ]; then
echo "::error::Ve verzi jsou soubory, které nepatří do gitu (jen cesty):"
echo "$names" | sed 's/^/ - /'
bad=1
fi
# 2) Podle obsahu: hlavička privátního klíče (vypíše jen názvy souborů)
keys=$(git grep -lI -E -e '-----BEGIN ((RSA|EC|DSA|OPENSSH|ENCRYPTED) )?PRIVATE KEY-----' -- . ':!*.md' ':!docs' ':!tests' || true)
if [ -n "$keys" ]; then
echo "::error::Soubory s hlavičkou privátního klíče (jen cesty):"
echo "$keys" | sed 's/^/ - /'
bad=1
fi
if [ "$bad" -ne 0 ]; then
echo "Postup: soubor odstranit z gitu, klíč považovat za kompromitovaný a rotovat (ADR 008). Vzor držet jako *.example."
exit 1
fi
echo "OK: žádné verzované klíče ani .env."
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,7 @@ pip-selfcheck.json
*.p12
*.pfx
*.jks

# lokální konfigurace (vzor: template.env)
elk/.env
elk-dev/.env
2 changes: 0 additions & 2 deletions elk-dev/.env

This file was deleted.

2 changes: 0 additions & 2 deletions elk/.env

This file was deleted.

File renamed without changes.
6 changes: 6 additions & 0 deletions qgis/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@

.env


# lokální kopie z *.example (ADR 008)

elk/.env
elk-dev/.env
.env.windows
3 changes: 2 additions & 1 deletion qgis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ You can execute same commands as Linux part given above if you use `make` (optio
Or in command powershell execute:

```
copy .env.windows.example .env.windows
docker-compose --env-file .env.windows up
```
Or if you want to test specific version, you can edit .env.windows and change (here last 3.3.x version):
`.env.windows` is a local copy (not versioned, see `.gitignore`). Or if you want to test specific version, you can edit it and change (here last 3.3.x version):

```
LIZMAP_VERSION_TAG=3.3
Expand Down
Loading