Skip to content

Fix/security recommendations #8

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 2 commits into from
Jun 16, 2025
Merged

Conversation

agustinfrancesa
Copy link
Contributor

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances security around external command execution, refines looping constructs for image downloads, and updates project ignore rules and CI permissions.

  • Replaces vulnerable execSync calls with execFileSync wrapped in try/catch blocks.
  • Refactors image‐processing loops to use for…of and adds optional chaining for safety.
  • Updates git/prettier ignore rules and grants necessary permissions for Trivy scans.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

File Description
gen/src/generateImages.ts Switched to execFileSync, added error handling, refactored loops/optionals
gen/.gitignore Added ignore rule for generated GraphQL code
.prettierignore Excluded CHANGELOG.md from formatting
.github/workflows/trivy-scan.yml Granted security-events: write and contents: read permissions
Comments suppressed due to low confidence (1)

gen/src/generateImages.ts:302

  • [nitpick] The variable names ImageID and ImageUrl use PascalCase; consider using imageId and imageUrl to follow camelCase conventions in JavaScript/TypeScript.
for (const [ImageID, ImageUrl] of Object.entries(allImageUrls) as [string, string][]) {

Signed-off-by: Francesa Alfaro, Agustin <agustin.francesa.alfaro@intel.com>
Signed-off-by: Francesa Alfaro, Agustin <agustin.francesa.alfaro@intel.com>
@agustinfrancesa agustinfrancesa force-pushed the fix/security_recommendations branch from 7872cf4 to e7f71d7 Compare June 16, 2025 20:26
@agustinfrancesa agustinfrancesa merged commit ba5243f into main Jun 16, 2025
4 checks passed
@agustinfrancesa agustinfrancesa deleted the fix/security_recommendations branch June 16, 2025 20:31
@spark-ibot
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@spark-ibot
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants