Skip to content

Commit 7ca5a30

Browse files
committed
Merge branch 'fix/security-scan-remediations' into 'main'
fix: remediate critical/high security scanner findings See merge request proserve/genaiid/reusable-assets/fullstack-agentcore-solution-template!42
2 parents 30abca2 + e2397eb commit 7ca5a30

File tree

12 files changed

+77
-41
lines changed

12 files changed

+77
-41
lines changed

.github/workflows/ash-security-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
if: github.event.workflow_run.event == 'pull_request'
1717
steps:
1818
- name: Download artifacts
19-
uses: actions/download-artifact@v4
19+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
2020
with:
2121
name: ash-security-results
2222
path: /tmp/ash-results

.github/workflows/label.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Labeler
22

33
on: [pull_request_target]
44

5+
permissions:
6+
contents: read
7+
pull-requests: write
8+
59
jobs:
610
label:
711
runs-on: ubuntu-latest

.github/workflows/repo-stats.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- cron: "0 11 * * *"
1111
workflow_dispatch: # Allow manual triggering from the Actions tab.
1212

13+
permissions:
14+
contents: write
15+
1316
jobs:
1417
collect-stats:
1518
name: collect-repo-stats

docker/Dockerfile.frontend.dev

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,9 @@ COPY . .
1717
# Expose port
1818
EXPOSE 3000
1919

20+
# Healthcheck for container orchestration (dev server)
21+
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
22+
CMD wget -qO- http://localhost:3000/ || exit 1
23+
2024
# Start development server (--host exposes to Docker network)
2125
CMD ["npm", "run", "dev", "--", "--host"]

docs/AGENTCORE_EVALUATIONS_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ Each log event contains a JSON object with OpenTelemetry-style attributes:
481481
"gen_ai.evaluation.score.label": "Very Helpful",
482482
"gen_ai.evaluation.explanation": "The response directly addresses the user's question with relevant and actionable information..."
483483
},
484-
"traceId": "abc123def456",
484+
"traceId": "abc123def456", // pragma: allowlist secret (example placeholder, not a real secret)
485485
"spanId": "789ghi",
486486
"sessionId": "session-456",
487487
"timestamp": "2026-02-17T00:42:42.086Z"

frontend/package-lock.json

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infra-cdk/lambdas/zip-packager/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def send_response(
6060
headers={"Content-Type": "application/json"},
6161
method="PUT",
6262
)
63-
urllib.request.urlopen(req)
63+
urllib.request.urlopen(req) # nosec B310 B113 — URL is the CloudFormation pre-signed ResponseURL, not user-controlled
6464

6565

6666
def download_wheels(requirements: list[str], download_dir: Path) -> None:

infra-cdk/lib/backend-stack.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,7 @@ export class BackendStack extends cdk.NestedStack {
995995
*/
996996
private readDirRecursive(dirPath: string, prefix: string, output: Record<string, string>): void {
997997
for (const entry of fs.readdirSync(dirPath, { withFileTypes: true })) {
998+
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal — dirPath is derived from __dirname-relative CDK build paths, not user input
998999
const fullPath = path.join(dirPath, entry.name)
9991000
const relativePath = path.join(prefix, entry.name)
10001001

infra-cdk/lib/utils/config-manager.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export class ConfigManager {
4747
}
4848

4949
private _loadConfig(configFile: string): AppConfig {
50+
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal — configFile is a hardcoded filename from the CDK app entry point, not user input
5051
const configPath = path.join(__dirname, "..", "..", configFile)
5152

5253
if (!fs.existsSync(configPath)) {
@@ -112,6 +113,7 @@ export class ConfigManager {
112113
return this.config
113114
}
114115

116+
// nosemgrep: javascript.lang.security.audit.prototype-pollution.prototype-pollution-loop.prototype-pollution-loop — iterates over a trusted local YAML config object, not user-controlled input
115117
public get(key: string, defaultValue?: any): any {
116118
const keys = key.split(".")
117119
let value: any = this.config

infra-cdk/package-lock.json

Lines changed: 39 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)