Skip to content

Commit

Permalink
Merge pull request #103 from fballiano/fix_ecomscan
Browse files Browse the repository at this point in the history
Avoid applying eComscan to archived repositories
  • Loading branch information
sprankhub authored Jan 2, 2025
2 parents 6ee1464 + fa93e27 commit ef0b8e8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ EOT
}

resource "github_repository_file" "sansec_ecomscan_workflow" {
for_each = var.repositories
for_each = {
for k, v in var.repositories : k => v
if !github_repository.repositories[k].archived
}
repository = github_repository.repositories[each.key].name
branch = github_repository.repositories[each.key].default_branch
file = ".github/workflows/sansec-ecomscan.yml"
Expand Down Expand Up @@ -274,10 +277,10 @@ jobs:
env:
ECOMSCAN_KEY: $${{ secrets.SANSEC_LICENSE_KEY }}
run: |
output=$$(./ecomscan --no-auto-update --skip-database --deep --format=csv .)
if [ -n "$$output" ]; then
output=$(./ecomscan --no-auto-update --skip-database --deep --format=csv .)
if [ -n "$output" ]; then
echo "Security issues found:"
echo "$$output"
echo "$output"
exit 1
fi
EOT
Expand Down

0 comments on commit ef0b8e8

Please sign in to comment.