Skip to content

Commit eae757a

Browse files
authored
Merge branch 'master' into main
2 parents b5dec98 + 0945643 commit eae757a

File tree

6 files changed

+110
-113
lines changed

6 files changed

+110
-113
lines changed

.github/dependabot.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# .github/dependabot.yml
2+
#
3+
# Formal configuration for Dependabot to automate supply chain security.
4+
5+
version: 2
6+
updates:
7+
# 1. Check for updates to the npm dependencies (e.g., @google/gemini-cli)
8+
# This ensures our core tool is always patched and up-to-date.
9+
- package-ecosystem: "npm"
10+
directory: "/" # Location of package.json
11+
schedule:
12+
interval: "weekly"
13+
# Assign reviewers or labels if needed
14+
# reviewers:
15+
# - "kalvinparker"
16+
17+
# 2. Check for updates to the Docker base image (node:22-alpine)
18+
# This is critical for patching OS-level vulnerabilities in our container.
19+
- package-ecosystem: "docker"
20+
directory: "/" # Location of Dockerfile
21+
schedule:
22+
interval: "weekly"
23+
24+
# 3. Check for updates to our GitHub Actions
25+
# This mitigates the risk of vulnerabilities in our CI/CD pipeline itself.
26+
- package-ecosystem: "github-actions"
27+
directory: "/" # Location of workflow files
28+
schedule:
29+
interval: "weekly"
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# .github/workflows/build-and-scan.yml
2+
3+
name: Build and Scan Image
4+
5+
# This workflow runs on every push to main and on every pull request
6+
on:
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
permissions:
13+
contents: read # Required to check out the code
14+
15+
jobs:
16+
build-and-scan:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
# STEP 1: Build the image and load it into the local runner daemon.
23+
# The 'load: true' command is the critical fix.
24+
- name: Build and load local image
25+
uses: docker/build-push-action@v5
26+
with:
27+
context: .
28+
load: true
29+
# We give it a temporary, predictable tag for the next step.
30+
tags: secure-gemini-cli:scan-target
31+
32+
# STEP 2: Scan the image that was just built and loaded.
33+
# This step will now find the image 'secure-gemini-cli:scan-target'.
34+
- name: Scan image with Trivy
35+
uses: aquasecurity/[email protected]
36+
with:
37+
image-ref: 'secure-gemini-cli:scan-target'
38+
format: 'table'
39+
exit-code: '1'
40+
ignore-unfixed: true
41+
vuln-type: 'os,library'
42+
severity: 'CRITICAL,HIGH'

.github/workflows/pr-scan.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,6 @@ This project isn't just a `Dockerfile`; it's a complete, secure software lifecyc
3838
- Size: ~656.6 MB
3939
- Trivy scan report (full JSON): `trivy-report.json` (saved in the project root)
4040
41-
Trivy findings (quick summary):
42-
43-
- I parsed and searched the saved `trivy-report.json` in this repository for vulnerability records. No vulnerability objects were found in the report.
44-
45-
Severity counts (from `trivy-report.json`):
46-
47-
- CRITICAL: 0
48-
- HIGH: 0
49-
- MEDIUM: 0
50-
- LOW: 0
51-
- UNKNOWN: 0
52-
5341
If you'd like a deeper supply-chain audit (for example, run `npm audit` locally and attempt auto-fixes, or re-run Trivy with a different policy), I can add step-by-step remediation guidance. Otherwise this image's saved scan contains no findings to triage.
5442
5543
## Build locally
@@ -94,10 +82,10 @@ docker run --rm aquasec/trivy:latest image secure-gemini-cli:latest
9482

9583
## Git / Commit
9684

97-
If you'd like to commit the approved configuration locally, run these PowerShell steps (replace `<your-username>` when adding the remote):
85+
If you'd like to commit the approved configuration locally, run these PowerShell steps (replace `<folder-location>` and `<your-username>` when adding the remote):
9886

9987
```powershell
100-
cd "D:\My Documents\Docker Projects\secure-gemini"
88+
cd "<folder-location>"
10189
# create .gitignore if you haven't already
10290
@"
10391
node_modules/
@@ -123,7 +111,7 @@ git push -u origin main
123111

124112
A GitHub Actions workflow (`.github/workflows/docker-build-scan.yml`) is included to build and scan the image with Trivy on push to `main`. This performs an automated check and can be adjusted to fail the build on specific severities.
125113

126-
To publish the image from CI (GHCR / Docker Hub), add the appropriate secrets to your repository and enable the `docker-build-scan-publish.yml` workflow. Required secrets for Docker Hub: `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` (or use GHCR with `GITHUB_TOKEN`).
114+
To publish the image from CI (GHCR / Docker Hub), add the appropriate secrets to your repository and enable the `build-scan-publish.yml` workflow. Required secrets for Docker Hub: `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` (or use GHCR with `GITHUB_TOKEN`).
127115

128116
## Notes
129117

SECURITY.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Security Policy
2+
3+
This document outlines the security policy for the `secure-gemini` project.
4+
5+
## Supported Versions
6+
7+
This project provides a configuration (`Dockerfile`) for building a secure container image. The security of the final image is dependent on the versions of the components at build time. I am committed to keeping the configuration in the `main` branch up-to-date with the latest secure practices.
8+
9+
| Version | Supported |
10+
| ------- | ------------------ |
11+
| `master` branch | :white_check_mark: |
12+
| Releases (Tags) | :white_check_mark: |
13+
| Older commits | :x: |
14+
15+
**User Responsibility:** Users are responsible for pulling the latest changes from the `master` branch and rebuilding their images to ensure they have the most recent security patches and dependency versions. My CI/CD pipeline (`pr-scan.yml`) continuously validates the security of the `main` branch.
16+
17+
## Reporting a Vulnerability
18+
19+
I take all security vulnerabilities seriously. I believe in coordinated disclosure and appreciate the community's help in keeping our project secure.
20+
21+
**How to Report a Vulnerability:**
22+
23+
Please **DO NOT** report security vulnerabilities through public GitHub issues.
24+
25+
Instead, please report them directly via one of the following methods:
26+
* **Primary Method:** Use GitHub's private vulnerability reporting feature, available under the "Security" tab of this repository.
27+
28+
**What to Expect:**
29+
30+
When you report a vulnerability, I will make every effort to:
31+
1. Acknowledge receipt of your report within 72 hours.
32+
2. Provide an initial assessment of the vulnerability's validity and impact.
33+
3. If the vulnerability is accepted, I will work on a fix and aim to release a patch.
34+
4. Keep you informed of our progress. I will coordinate with you on the public disclosure of the vulnerability after a fix has been released.
35+
36+
I am committed to a transparent and timely response. Thank you for helping to keep this project secure.

0 commit comments

Comments
 (0)