Skip to content

Add Semgrep configuration and ignore file; update CONTRIBUTING.md and README.md - #17

Merged
localpath merged 2 commits into
mainfrom
garrick/giv-9546-pr-67a-loader-security-posture-semgrep-sast-socket-badge
Jul 24, 2026
Merged

Add Semgrep configuration and ignore file; update CONTRIBUTING.md and README.md#17
localpath merged 2 commits into
mainfrom
garrick/giv-9546-pr-67a-loader-security-posture-semgrep-sast-socket-badge

Conversation

@localpath

Copy link
Copy Markdown
Member

GIV-9546: Add Semgrep SAST and README trust badges for the loader

What is the feature/bug?

The public payment-elements loader had CI, Inspector, CodeQL, and Socket, but no Semgrep SAST. The README also lacked an honest trust strip; the Socket badge story was pinned to the bootstrap latest package rather than the live package page.

What is the solution?

  • .github/workflows/semgrep.yml: blocking p/secrets (repo-wide) and p/typescript + p/javascript (src/, test/) on PRs to main, plus weekly cron and workflow_dispatch; SARIF artifacts retained 90 days
  • .semgrepignore: skip generated types/, build output, and node_modules/
  • README.md: npm next, CI, Semgrep, Socket (package-level), license, and Node badges; docs link pointed at /payment-elements
  • CONTRIBUTING.md: PR check expectations and a maintainers scanners table (Semgrep, Inspector, CodeQL, Socket, npm provenance)

What areas of the application does it impact?

Overflow-App/payment-elements only (CI/docs). No runtime loader or CDN SDK changes.

Testing

  • Local Semgrep via semgrep/semgrep Docker image on src/ + test/: 0 findings
  • GitHub Semgrep + CI: to run on this PR

Notes

… README.md
- Introduced `.semgrepignore` to specify paths for Semgrep to skip.
- Added Semgrep GitHub Actions workflow for security and code quality checks.
- Updated `CONTRIBUTING.md` to include details about automated checks on PRs.
- Enhanced `README.md` with additional badges for CI, Semgrep, and Socket.
CopilotAI review requested due to automatic review settings July 24, 2026 16:24
@amazon-inspector-oregon

Copy link
Copy Markdown

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@amazon-inspector-oregon

Copy link
Copy Markdown

✅ I finished the code review, and didn't find any security or code quality issues.

hassanoverflow
hassanoverflow previously approved these changes Jul 24, 2026

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds Semgrep SAST scanning to CI and updates repository documentation to reflect security/trust signals and contributor expectations.

Changes:

  • Introduce a Semgrep GitHub Actions workflow with secrets + JS/TS rules and SARIF artifact upload.
  • Add .semgrepignore to exclude generated/build/vendor paths from scans.
  • Update README badges/docs link and expand CONTRIBUTING with PR check expectations + a scanners table.

Reviewed changes

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

FileDescription
README.mdAdds trust/status badges and adjusts documentation link.
CONTRIBUTING.mdDocuments expected PR checks and adds maintainers’ scanner matrix.
.semgrepignoreDefines Semgrep ignore paths for generated/build/vendor artifacts.
.github/workflows/semgrep.ymlAdds Semgrep CI workflow for PRs + scheduled scans with SARIF artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadCONTRIBUTING.md
Comment thread.semgrepignore
Comment thread.github/workflows/semgrep.yml Outdated
Comment threadREADME.md Outdated
- Added `node_modules/` to `.semgrepignore` to reduce noise in scans.
- Updated README.md to link directly to the LICENSE file in the repository.
- Pinned the Semgrep CLI image version in the GitHub Actions workflow for reproducibility.
CopilotAI review requested due to automatic review settings July 24, 2026 17:16

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment threadCONTRIBUTING.md
@localpath
localpath merged commit f1d9662 into mainJul 24, 2026
3 of 4 checks passed
@localpath
localpath deleted the garrick/giv-9546-pr-67a-loader-security-posture-semgrep-sast-socket-badge branch July 24, 2026 17:48
Sign up for freeto 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.

3 participants

@localpath@hassanoverflow