Skip to content

Commit d7c1bee

Browse files
committed
Implement enhanced security workflows in GitHub Actions
- Replaced the existing OSS Security SAST job with a comprehensive CodeQL Analysis job for improved code security scanning. - Added Dependency Review, Secrets Scan, and Cargo Audit jobs to further enhance security measures and dependency management. - Each job is configured to run on Ubuntu and includes necessary steps for repository checkout and tool execution. These updates significantly strengthen the security posture of the project by integrating multiple scanning and auditing tools into the CI/CD pipeline.
1 parent 1a998e9 commit d7c1bee

File tree

2 files changed

+137
-8
lines changed

2 files changed

+137
-8
lines changed

.github/workflows/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# GitHub Actions Workflows
2+
3+
This directory contains GitHub Actions workflows for the Roblox Studio MCP Server project.
4+
5+
## Workflows
6+
7+
### Security Scan (`security-scan.yml`)
8+
9+
Performs comprehensive security scanning on every push and pull request:
10+
11+
- **CodeQL Analysis**: Static Application Security Testing (SAST) for Rust code
12+
- **Dependency Review**: Scans dependencies for known vulnerabilities (PRs only)
13+
- **Secrets Scan**: Detects accidentally committed secrets using Gitleaks
14+
- **Cargo Audit**: Checks Rust dependencies for security vulnerabilities
15+
16+
### Code Quality Checks (`checks.yml`)
17+
18+
Ensures code quality and formatting standards:
19+
20+
- **Clippy**: Rust linter for catching common mistakes
21+
- **Format Check**: Ensures code follows consistent formatting
22+
- **Selene**: Luau linter for the plugin code
23+
- **StyLua**: Luau code formatter
24+
25+
### Build (`build.yml`)
26+
27+
Cross-platform builds and releases:
28+
29+
- **macOS Build**: Universal binary for both Intel and Apple Silicon
30+
- **Windows Build**: Native Windows executable
31+
- **Code Signing**: Signs binaries for both platforms
32+
- **Release**: Creates GitHub releases with signed artifacts
33+
34+
### Linux Build (`build-linux.yml`)
35+
36+
Specialized Linux binary build process.
37+
38+
## Required Secrets
39+
40+
The following secrets need to be configured in your repository settings:
41+
42+
### Security Workflow
43+
- `GITLEAKS_KEY` (optional): License key for Gitleaks if you have one
44+
45+
### Build Workflow
46+
- `APPLE_API_KEY_ID`: Apple Developer API Key ID
47+
- `APPLE_API_ISSUER`: Apple Developer API Issuer
48+
- `APPLE_API_KEY_CONTENT`: Apple Developer API Key content
49+
- `APPLE_CERT_PASSWORD`: Certificate password for macOS signing
50+
- `AZURE_TENANT_ID`: Azure tenant ID for Windows signing
51+
- `AZURE_CLIENT_ID`: Azure client ID for Windows signing
52+
- `AZURE_CLIENT_SECRET`: Azure client secret for Windows signing
53+
- `SIGNING_ACCOUNT`: Signing account identifier
54+
55+
## Security Features
56+
57+
The security workflow implements multiple layers of protection:
58+
59+
1. **Static Analysis**: CodeQL analyzes the Rust source code for potential security issues
60+
2. **Dependency Scanning**: Automatically checks for vulnerable dependencies
61+
3. **Secret Detection**: Prevents accidental exposure of API keys, passwords, and tokens
62+
4. **Rust-Specific Security**: Cargo audit checks for known vulnerabilities in Rust crates
63+
64+
All security checks must pass before code can be merged into the main branch.

.github/workflows/security-scan.yml

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,76 @@ on:
77
- main
88

99
jobs:
10-
security:
11-
name: OSS Security SAST
12-
uses: Roblox/security-workflows/.github/workflows/oss-security-sast.yaml@main
13-
with:
14-
skip-ossf: true
15-
secrets:
16-
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_KEY }}
17-
ROBLOX_SEMGREP_GHC_POC_APP_TOKEN: ${{ secrets.ROBLOX_SEMGREP_GHC_POC_APP_TOKEN }}
10+
codeql-analysis:
11+
name: CodeQL Analysis
12+
runs-on: ubuntu-latest
13+
permissions:
14+
actions: read
15+
contents: read
16+
security-events: write
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
language: [ 'rust' ]
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Initialize CodeQL
28+
uses: github/codeql-action/init@v3
29+
with:
30+
languages: ${{ matrix.language }}
31+
queries: security-extended,security-and-quality
32+
33+
- name: Autobuild
34+
uses: github/codeql-action/autobuild@v3
35+
36+
- name: Perform CodeQL Analysis
37+
uses: github/codeql-action/analyze@v3
38+
with:
39+
category: "/language:${{matrix.language}}"
40+
41+
dependency-review:
42+
name: Dependency Review
43+
runs-on: ubuntu-latest
44+
if: github.event_name == 'pull_request'
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v4
48+
- name: Dependency Review
49+
uses: actions/dependency-review-action@v4
50+
51+
secrets-scan:
52+
name: Secrets Scan
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout repository
56+
uses: actions/checkout@v4
57+
with:
58+
fetch-depth: 0
59+
60+
- name: Run Gitleaks
61+
uses: gitleaks/gitleaks-action@v2
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_KEY }}
65+
66+
cargo-audit:
67+
name: Cargo Audit
68+
runs-on: ubuntu-latest
69+
steps:
70+
- name: Checkout repository
71+
uses: actions/checkout@v4
72+
73+
- name: Install Rust
74+
uses: dtolnay/rust-toolchain@stable
75+
with:
76+
components: rust-src
77+
78+
- name: Install cargo-audit
79+
run: cargo install cargo-audit
80+
81+
- name: Run cargo audit
82+
run: cargo audit

0 commit comments

Comments
 (0)