Skip to content

feat: add anchore/scan-action - #30

Merged
VatcheTavitian merged 1 commit into
mainfrom
feature/anchore/scan-action
Oct 6, 2026
Merged

VatcheTavitian merged 1 commit into
mainfrom
feature/anchore/scan-action

Conversation

@axi92

@axi92 axi92 commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Security Review: anchore/scan-action

Date: October 5, 2026
Verdict: ✅ SAFE TO USE (with minor caution)
Tag: v7.4.2
SHA: 27805bf3b4e84b4a5c980df22ed233c00390a439


Quick Summary

Category Status Notes
Malicious Code ✅ None Found No backdoors, obfuscation, or suspicious patterns
Dependency Issues ⚠️ High severity Run npm audit fix before production
External Scripts ⚠️ Low Risk Downloads install.sh from Anchore repo (see below)
Input Validation ✅ Good All inputs validated

Risk: External install.sh Script

Location: action.js lines 79-87, 107-114

The action downloads and executes this script:

const installScriptUrl =
`https://raw.githubusercontent.com/anchore/grype/${ref}/install.sh`;

Risk Assessment: LOW but worth noting

  • Why it's safe: Script comes from official anchore/grype repository with version pinning
  • Why it's a concern: If the Grype repo is compromised, attackers could inject malicious code
  • Attack vector: Supply chain attack via GitHub repository compromise

Mitigation Factors:

  1. Version sha pinning
  2. GitHub's infrastructure protects against unauthorized commits
  3. Anchore is a well-established security company
  4. The script is only used to download/extract Grype binary (no complex logic)

Recommendation:

  • Pin to specific commit SHA in production workflows
  • Monitor the Grype repository for unusual activity

Other Findings

Good Security Practices

  • GitHub Actions security hardening (no unused permissions)
  • Dependabot configured for dependency updates
  • CodeQL integration for security scanning
  • No hardcoded secrets or credentials
  • Input validation for all parameters

Dependency Vulnerabilities

2 high severity npm vulnerabilities found:
- brace-expansion: DoS vulnerabilities
- undici: HTTP header injection vulnerabilities

Conclusion

This action is developed and maintained by Anchore, a reputable security company. The external script execution is the primary concern, but it's mitigated by version pinning and the official nature of the Grype repository.

This review was assisted by AI.

# Security Review: anchore/scan-action

**Date**: October 5, 2026
**Verdict**: ✅ SAFE TO USE (with minor caution)
**Tag**: v7.4.2
**SHA**: 27805bf3b4e84b4a5c980df22ed233c00390a439

---

## Quick Summary

| Category | Status | Notes |
|----------|--------|-------|
| Malicious Code | ✅ None Found | No backdoors, obfuscation, or
suspicious patterns |
| Dependency Issues | ⚠️ High severity | Run `npm audit fix` before
production |
| External Scripts | ⚠️ Low Risk | Downloads `install.sh` from Anchore
repo (see below) |
| Input Validation | ✅ Good | All inputs validated |
| Documentation | ✅ Excellent | Comprehensive README, tests, examples |

---

## Risk: External install.sh Script

**Location**: `action.js` lines 79-87, 107-114

The action downloads and executes this script:
```javascript
const installScriptUrl =
`https://raw.githubusercontent.com/anchore/grype/${ref}/install.sh`;
```

**Risk Assessment**: LOW but worth noting

- **Why it's safe**: Script comes from official `anchore/grype`
repository with version pinning
- **Why it's a concern**: If the Grype repo is compromised, attackers
could inject malicious code
- **Attack vector**: Supply chain attack via GitHub repository
compromise

**Mitigation Factors**:
1. Version sha pinning
2. GitHub's infrastructure protects against unauthorized commits
3. Anchore is a well-established security company
4. The script is only used to download/extract Grype binary (no complex
logic)

**Recommendation**:
- Pin to specific commit SHA in production workflows
- Monitor the Grype repository for unusual activity

---

## Other Findings

### Good Security Practices
- GitHub Actions security hardening (no unused permissions)
- Dependabot configured for dependency updates
- CodeQL integration for security scanning
- No hardcoded secrets or credentials
- Input validation for all parameters

### Dependency Vulnerabilities
```
2 high severity npm vulnerabilities found:
- brace-expansion: DoS vulnerabilities
- undici: HTTP header injection vulnerabilities
```

---

## Conclusion

This action is developed and maintained by Anchore, a reputable security
company. The external script execution is the primary concern, but it's
mitigated by version pinning and the official nature of the Grype
repository.
@axi92
axi92 requested a review from VatcheTavitian October 5, 2026 15:51

@VatcheTavitian VatcheTavitian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@VatcheTavitian
VatcheTavitian merged commit 3074466 into main Oct 6, 2026
3 checks passed
@VatcheTavitian
VatcheTavitian deleted the feature/anchore/scan-action branch October 6, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants