Skip to content

Commit cf17ded

Browse files
authored
Merge pull request #2 from orang2bejo/codex/conduct-comprehensive-audit-for-jarvis-ai-project-8yncbg
Add secure config validation and telemetry
2 parents 8e3fb02 + e60e37a commit cf17ded

35 files changed

Lines changed: 1059 additions & 314 deletions

.github/workflows/ci.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ jobs:
7979
- name: Run installation test
8080
run: |
8181
python test_installation.py
82+
83+
- name: Upload audit reports
84+
if: always()
85+
uses: actions/upload-artifact@v3
86+
with:
87+
name: audit-reports
88+
path: audit_reports/
8289

8390
- name: Generate coverage report
8491
run: |
@@ -167,4 +174,32 @@ jobs:
167174

168175
- name: Notify on failure
169176
if: ${{ needs.test.result == 'failure' }}
170-
run: echo "❌ Tests failed. Please check the logs."
177+
run: echo "❌ Tests failed. Please check the logs."
178+
179+
supply-chain:
180+
runs-on: ubuntu-latest
181+
steps:
182+
- uses: actions/checkout@v4
183+
184+
- name: Generate SBOM
185+
run: |
186+
pip install cyclonedx-bom
187+
cyclonedx-py --format json --output sbom.json
188+
189+
- name: Scan secrets
190+
uses: gitleaks/gitleaks-action@v2
191+
with:
192+
args: '--no-git --path .'
193+
194+
- name: CVE audit
195+
run: |
196+
pip install pip-audit
197+
pip-audit > cve-report.txt || true
198+
199+
- name: Upload supply-chain artifacts
200+
uses: actions/upload-artifact@v3
201+
with:
202+
name: supply-chain
203+
path: |
204+
sbom.json
205+
cve-report.txt

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.12'
16+
- name: Build wheel
17+
run: |
18+
pip install build
19+
python -m build
20+
- name: Upload artifact
21+
uses: actions/upload-artifact@v3
22+
with:
23+
name: wheel
24+
path: dist/*.whl

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 24.3.0
4+
hooks:
5+
- id: black
6+
- repo: https://github.com/astral-sh/ruff-pre-commit
7+
rev: v0.3.4
8+
hooks:
9+
- id: ruff
10+
- repo: https://github.com/Yelp/detect-secrets
11+
rev: v1.4.0
12+
hooks:
13+
- id: detect-secrets
14+
args: ['--baseline', '.secrets.baseline']

.secrets.baseline

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": "1.0.0",
3+
"plugins_used": [],
4+
"results": {}
5+
}

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
## 0.1.0 - 2024-06-12
4+
- add config validation with Pydantic
5+
- integrate Windows secret store
6+
- sanitize logs and enforce retention
7+
- GPU auto-detection for STT/TTS with healthcheck
8+
- rate limiting and retry utilities
9+
- PowerShell hardening and CI supply-chain jobs

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Jarvis Windows Agent
2+
3+
![CI](https://github.com/CursorTouch/AI_Agents/actions/workflows/ci.yml/badge.svg)
4+
5+
Jarvis is an autonomous agent for Windows automation, integrating voice, web, and desktop controls.
6+
7+
## Security & Compliance
8+
- Default automation mode is **ASSISTIVE**; other modes are documented in [Security Modes](docs/SECURITY_MODES.md).
9+
- Secrets are stored via Windows Credential Manager; see [SECRETS.md](docs/SECRETS.md).
10+
- Logs are sanitized and rotated every 14 days. Use `scripts/healthcheck.py` to inspect device providers.
11+
12+
## Healthcheck
13+
```bash
14+
python scripts/healthcheck.py
15+
```

audit_reports/ACTION_PLAN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
- Resolve `jarvis_demo.py` syntax error to restore build.
88

99
## P1 – Near Term
10+
codex/conduct-comprehensive-audit-for-jarvis-ai-project-8yncbg
11+
- Implement `obs/device_telemetry.py` and `scripts/healthcheck.py` for CPU/GPU metrics.
12+
=======
1013
- Implement `utils/device_telemetry.py` and `scripts/healthcheck.py` for CPU/GPU metrics.
14+
main
1115
- Add CI workflow running `ruff`, `black --check`, `mypy`, `pytest` (skip Office if unavailable).
1216
- Refactor large modules (`web_form_automation.py`, `hitl.py`).
1317
- Ensure `personality_state.json` and other runtime data are gitignored.

audit_reports/CPU_GPU_TELEMETRY_GAP.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
## Recommended Patches
1010
```python
11+
codex/conduct-comprehensive-audit-for-jarvis-ai-project-8yncbg
12+
# obs/device_telemetry.py (new)
13+
=======
1114
# utils/device_telemetry.py (new)
15+
main
1216
import psutil, json
1317

1418
def snapshot() -> dict:
@@ -19,7 +23,11 @@ def snapshot() -> dict:
1923
```
2024
```python
2125
# scripts/healthcheck.py (new)
26+
codex/conduct-comprehensive-audit-for-jarvis-ai-project-8yncbg
27+
from obs.device_telemetry import snapshot
28+
=======
2229
from utils.device_telemetry import snapshot
30+
main
2331

2432
if __name__ == "__main__":
2533
stats = snapshot()

config/logging.yaml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,33 @@ handlers:
3434
stream: ext://sys.stdout
3535

3636
file:
37-
class: logging.handlers.RotatingFileHandler
37+
class: logging.handlers.TimedRotatingFileHandler
3838
level: DEBUG
3939
formatter: detailed
4040
filename: logs/jarvis.log
41-
maxBytes: 10485760 # 10MB
42-
backupCount: 5
41+
when: D
42+
interval: 1
43+
backupCount: 14
4344
encoding: utf8
44-
45+
4546
error_file:
46-
class: logging.handlers.RotatingFileHandler
47+
class: logging.handlers.TimedRotatingFileHandler
4748
level: ERROR
4849
formatter: detailed
4950
filename: logs/jarvis_errors.log
50-
maxBytes: 10485760 # 10MB
51-
backupCount: 3
51+
when: D
52+
interval: 1
53+
backupCount: 14
5254
encoding: utf8
53-
55+
5456
performance_file:
55-
class: logging.handlers.RotatingFileHandler
57+
class: logging.handlers.TimedRotatingFileHandler
5658
level: DEBUG
5759
formatter: json
5860
filename: logs/jarvis_performance.log
59-
maxBytes: 10485760 # 10MB
60-
backupCount: 3
61+
when: D
62+
interval: 1
63+
backupCount: 14
6164
encoding: utf8
6265
filters: [performance]
6366

config/models.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
planner: gpt-4
2+
judge: gpt-4
3+
offline: small
4+
vision: null

0 commit comments

Comments
 (0)