Skip to content

Commit 826237e

Browse files
fedorovclaude
andcommitted
Address security findings from K-Dense-AI audit
- Pin idc-index version in auto-upgrade subprocess call to REQUIRED_VERSION - Document expected network endpoints in Overview (GCS, S3, BigQuery, DICOMweb) - Add tested-with comment for optional dependencies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9ffa461 commit 826237e

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
1111

1212
- `tests/test_bq_snippets.py`: BigQuery snippet validation using `bq query --dry_run` — 33 tests covering all SQL examples in `references/bigquery_guide.md` (dicom_all, original_collections_metadata, segmentations, quantitative_measurements, qualitative_measurements, private elements, and clinical tables); skips automatically when `bq` CLI is unavailable or unauthenticated
1313

14+
### Security
15+
16+
- Fixed auto-upgrade subprocess call to pin `idc-index` to `REQUIRED_VERSION` (was `"idc-index"`, now `f"idc-index=={REQUIRED_VERSION}"`), ensuring the installed version always matches the tested version declared in the frontmatter
17+
- Added network access transparency note to Overview documenting expected external endpoints (GCS, S3, BigQuery, DICOMweb proxy, Google Healthcare API) and clarifying that no credentials or environment variables are accessed by the skill
18+
- Added tested-with version comment to optional dependency install block (`pandas>=1.5, numpy>=1.23, pydicom>=2.3`)
19+
1420
### Changed
1521

1622
- Updated to idc-index 0.12.1 (idc-index-data 24.0.4, IDC data version v24)

SKILL.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ metadata:
1616

1717
Use the `idc-index` Python package to query and download public cancer imaging data from the National Cancer Institute Imaging Data Commons (IDC). No authentication required for data access.
1818

19+
**Expected network access:** `idc-index` queries a local DuckDB index (no network for metadata). File downloads use public GCS (`storage.googleapis.com`) and AWS S3 (`s3.amazonaws.com`) — no authentication required. DICOMweb access uses either the public IDC proxy (`proxy.imaging.datacommons.cancer.gov`, no auth) or the Google Cloud Healthcare API (`healthcare.googleapis.com`, requires GCP authentication). Optional BigQuery queries (`bigquery.googleapis.com`) also require GCP authentication. No credentials or environment variables are accessed by this skill.
20+
1921
**Current IDC Data Version: v24** (always verify with `IDCClient().get_idc_version()`)
2022

2123
**Primary tool:** `idc-index` ([GitHub](https://github.com/imagingdatacommons/idc-index))
@@ -31,7 +33,7 @@ installed = idc_index.__version__
3133
if installed < REQUIRED_VERSION:
3234
print(f"Upgrading idc-index from {installed} to {REQUIRED_VERSION}...")
3335
import subprocess
34-
subprocess.run(["pip3", "install", "--upgrade", "--break-system-packages", "idc-index"], check=True)
36+
subprocess.run(["pip3", "install", "--upgrade", "--break-system-packages", f"idc-index=={REQUIRED_VERSION}"], check=True)
3537
print("Upgrade complete. Restart Python to use new version.")
3638
else:
3739
print(f"idc-index {installed} meets requirement ({REQUIRED_VERSION})")
@@ -245,6 +247,7 @@ If you see an older version, upgrade with: `pip install --upgrade idc-index`
245247

246248
**Optional (for data analysis):**
247249
```bash
250+
# Tested with: pandas>=1.5, numpy>=1.23, pydicom>=2.3
248251
pip install pandas numpy pydicom
249252
```
250253

0 commit comments

Comments
 (0)