Skip to content

Commit ed89172

Browse files
Copilothyp3ri0n-ng
andcommitted
Fix code review feedback - improve documentation clarity
- Fix YAML syntax error in Bandit configuration (expand B314-B320 range) - Add specific Amazon Q CLI installation instructions with AWS documentation link - Improve Amazon Q workflow placeholder comments with clearer guidance - Remove invalid /tmp/security_examples.py reference in SECURITY.md - Replace with references to examples directory and CDP documentation Co-authored-by: hyp3ri0n-ng <3106718+hyp3ri0n-ng@users.noreply.github.com>
1 parent f84b98f commit ed89172

File tree

2 files changed

+66
-20
lines changed

2 files changed

+66
-20
lines changed

SECURITY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ frame_id, loader_id, error_text, is_download = await conn.execute(page.navigate(
254254

255255
## Examples
256256

257-
See `/tmp/security_examples.py` for comprehensive code examples demonstrating all new security APIs.
257+
For practical examples demonstrating the security-focused APIs, see the [examples directory](examples/) and the usage examples throughout this document.
258+
259+
You can also refer to the [Chrome DevTools Protocol documentation](https://chromedevtools.github.io/devtools-protocol/) for additional examples and specifications.
258260

259261
## Version Information
260262

SECURITY_SETUP.md

Lines changed: 63 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,51 @@ tests:
134134
- B311 # Random usage
135135
- B312 # Telnet usage
136136
- B313 # XML parsing vulnerabilities
137-
- B314 - B320 # XML vulnerabilities
137+
- B314 # XML element tree vulnerabilities
138+
- B315 # XML expat vulnerabilities
139+
- B316 # XML sax vulnerabilities
140+
- B317 # XML minidom vulnerabilities
141+
- B318 # XML pull DOM vulnerabilities
142+
- B319 # XML etree vulnerabilities
143+
- B320 # XML lxml vulnerabilities
138144
- B321 # FTP usage
139145
- B323 # Unverified SSL context
140146
- B324 # Insecure hash functions
141147
- B325 # Tempfile usage
142-
- B401 - B413 # Import vulnerabilities
143-
- B501 - B509 # Crypto issues
144-
- B601 - B612 # Shell/subprocess issues
148+
- B401 # Import telnetlib
149+
- B402 # Import ftplib
150+
- B403 # Import pickle
151+
- B404 # Import subprocess
152+
- B405 # Import xml.etree
153+
- B406 # Import xml.sax
154+
- B407 # Import xml.dom
155+
- B408 # Import xml.minidom
156+
- B409 # Import xml.pulldom
157+
- B410 # Import lxml
158+
- B411 # Import xmlrpc
159+
- B412 # Import httpoxy
160+
- B413 # Import pycrypto
161+
- B501 # Request with verify=False
162+
- B502 # SSL with bad defaults
163+
- B503 # SSL with bad version
164+
- B504 # SSL with bad ciphers
165+
- B505 # Weak cryptographic key
166+
- B506 # YAML load
167+
- B507 # SSH with bad defaults
168+
- B508 # SNI missing
169+
- B509 # MD5 hash
170+
- B601 # Shell=True in subprocess
171+
- B602 # Shell=True in popen
172+
- B603 # Untrusted input in subprocess
173+
- B604 # Shell=True with call
174+
- B605 # Starting process with shell
175+
- B606 # No shell escape
176+
- B607 # Start process with partial path
177+
- B608 # SQL injection
178+
- B609 # Linux commands wildcard
179+
- B610 # Django extra
180+
- B611 # Django rawsql
181+
- B612 # Logging config dictConfig
145182
- B701 # Jinja2 autoescape
146183
- B702 - B703 # Mako templates
147184
```
@@ -263,31 +300,34 @@ To enable Amazon Q for enhanced security scanning:
263300

264301
### Setup Steps
265302

266-
1. **Install Amazon Q CLI** (when available):
267-
```bash
268-
# Follow AWS documentation for installation
269-
aws configure # Configure AWS credentials
270-
```
303+
1. **Install Amazon Q CLI:**
304+
- Amazon Q CLI is currently in preview
305+
- Visit the [AWS documentation](https://aws.amazon.com/q/developer/) for the latest installation instructions
306+
- Configure AWS credentials:
307+
```bash
308+
aws configure
309+
```
271310

272311
2. **Configure Repository Access:**
273-
- Add AWS credentials to repository secrets:
312+
- Add AWS credentials to repository secrets (Settings → Secrets and variables → Actions):
274313
- `AWS_ACCESS_KEY_ID`
275314
- `AWS_SECRET_ACCESS_KEY`
276315
- `AWS_REGION`
277316

278317
3. **Enable Amazon CodeWhisperer:**
279-
- Install CodeWhisperer IDE extension
280-
- Configure for security scanning
281-
- Review security findings regularly
318+
- Install CodeWhisperer IDE extension from your IDE marketplace
319+
- Sign in with AWS Builder ID or IAM credentials
320+
- Enable security scanning in CodeWhisperer settings
321+
- Review security findings in the CodeWhisperer panel
282322

283323
4. **Custom Review Rules:**
284-
- Define project-specific security rules
285-
- Configure scanning frequency
286-
- Set up notification channels
324+
- Define project-specific security rules in your repository
325+
- Configure scanning frequency based on your needs
326+
- Set up notification channels (email, Slack, etc.)
287327

288328
### Amazon Q Workflow Integration
289329

290-
Create `.github/workflows/amazonq-security.yml`:
330+
When Amazon Q CLI becomes generally available, create `.github/workflows/amazonq-security.yml`:
291331

292332
```yaml
293333
name: Amazon Q Security Review
@@ -314,8 +354,12 @@ jobs:
314354
315355
- name: Run Amazon Q Security Scan
316356
run: |
317-
# Amazon Q CLI commands (when available)
318-
echo "Amazon Q integration pending CLI availability"
357+
# Note: This is a placeholder for when Amazon Q CLI becomes generally available
358+
# Check AWS documentation for the latest Amazon Q CLI commands
359+
# Example future commands might include:
360+
# amazon-q scan --repository . --output security-report.json
361+
echo "Amazon Q CLI integration - awaiting general availability"
362+
echo "Visit https://aws.amazon.com/q/developer/ for updates"
319363
320364
- name: Upload Security Report
321365
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)