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
5 changes: 5 additions & 0 deletions .github/workflows/reusable-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
fetch-depth: 0
- name: Найти случайно добавленные секреты
uses: docker://ghcr.io/gitleaks/gitleaks:v8.30.1
env:
GIT_CONFIG_COUNT: "1"
GIT_CONFIG_KEY_0: safe.directory
GIT_CONFIG_VALUE_0: /github/workspace
with:
args: git --redact --verbose /github/workspace
- name: Проверить файлы и IaC
Expand All @@ -33,4 +37,5 @@ jobs:
ignore-unfixed: true
exit-code: "1"
trivyignores: ${{ inputs.trivy-ignore-file }}
version: v0.74.0

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

- `.github/workflows/` — процессы, которые могут вызывать другие репы.
- `reusable-docs.yml` проверяет структуру и строго собирает MkDocs.
- `reusable-security.yml` запускает Gitleaks и закреплённую версию Trivy на чистом runner.
- `.github/ISSUE_TEMPLATE/` — шаблоны задач.
- `profile/README.md` — главная страница организации.
- `docs/` — правила и устройство этого репозитория.
Expand Down
3 changes: 3 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ pwsh ./scripts/check-workflows.ps1
```

Новый общий workflow также проверяется в тестовом репозитории до обязательного включения для всех сервисов.

Security workflow передаёт Docker-версии Gitleaks безопасный Git path и закрепляет Trivy на реально
выпущенной версии. Обновление pin сначала проверяется на чистом runner без расчёта на старый cache.
15 changes: 14 additions & 1 deletion scripts/check-workflows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,17 @@ foreach ($stepName in $publishSteps) {
}
}

Write-Host "Режимы container workflow настроены корректно."
$securityWorkflow = Get-Content -LiteralPath ".github/workflows/reusable-security.yml" -Raw
$securityRules = @(
'GIT_CONFIG_KEY_0: safe.directory',
'GIT_CONFIG_VALUE_0: /github/workspace',
'version: v0.74.0'
)

foreach ($rule in $securityRules) {
if (-not $securityWorkflow.Contains($rule)) {
throw "В reusable-security.yml нет ожидаемого правила: $rule"
}
}

Write-Host "Общие workflows настроены корректно."
Loading