Skip to content

Commit 4fcc1b8

Browse files
fix: address Copilot security review comments
- Add title field to report-issue.yml template - Add input validation section to report-analysis.md - Validate spec_id matches ^[a-z0-9-]+$ pattern before use - Validate library is one of allowed values - Remove shell command examples to prevent injection risks Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3acb7e0 commit 4fcc1b8

3 files changed

Lines changed: 49 additions & 91 deletions

File tree

.github/ISSUE_TEMPLATE/report-issue.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Report Issue
22
description: Report an issue with an existing plot spec or implementation
3+
title: "Report: "
34
labels: ["report-pending"]
45
body:
56
- type: markdown

docs/plot-types-catalog.md

Lines changed: 23 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
7272
### line-annotated-events ✅
7373
**Description:** A line plot with annotations marking significant events or milestones along the time series.
7474

75-
### line-interactive 📋
75+
### line-interactive
7676
**Description:** Line plot with hover tooltips and zoom capability.
7777

7878
### line-loss-training ✅
@@ -81,6 +81,9 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
8181
### line-timeseries-rolling ✅
8282
**Description:** Time series plot with rolling average overlay for trend smoothing.
8383

84+
### line-animated-progressive ✅
85+
**Description:** Animated line plot that progressively draws over time.
86+
8487
---
8588

8689
## 3. Bar Charts
@@ -115,7 +118,7 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
115118
### lollipop-basic ✅
116119
**Description:** A lollipop chart displays categorical data with thin lines (stems) extending from a baseline to circular markers (dots) at each data point.
117120

118-
### bar-interactive 📋
121+
### bar-interactive
119122
**Description:** Bar chart with hover details and click interactions.
120123

121124
### bar-feature-importance ✅
@@ -128,9 +131,6 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
128131
### histogram-basic ✅
129132
**Description:** A histogram displays the distribution of a single continuous variable by dividing the data range into bins and showing the frequency of observations in each bin.
130133

131-
### histogram-normalized ✅
132-
**Description:** Histogram normalized to show density instead of count.
133-
134134
### histogram-overlapping ✅
135135
**Description:** Multiple overlapping histograms for comparison.
136136

@@ -293,9 +293,6 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
293293
### regression-linear 📋
294294
**Description:** Scatter with linear regression fit and confidence band.
295295

296-
### regression-polynomial ✅
297-
**Description:** Non-linear regression curve fit.
298-
299296
### regression-lowess 📋
300297
**Description:** Locally weighted regression smoothing.
301298

@@ -305,18 +302,12 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
305302
### qq-basic ✅
306303
**Description:** A Q-Q (Quantile-Quantile) plot compares the distribution of a dataset against a theoretical distribution. Points along a diagonal reference line indicate perfect distribution match.
307304

308-
### bland-altman ✅
309-
**Description:** Agreement plot between two measurements with limits of agreement.
310-
311305
### bland-altman-basic ✅
312306
**Description:** Bland-Altman agreement plot comparing two measurement methods with mean difference and limits of agreement.
313307

314308
### errorbar-basic ✅
315309
**Description:** An error bar plot displays data points with associated uncertainty or variability represented by bars extending above and below each point.
316310

317-
### error-asymmetric ✅
318-
**Description:** Error bars with different upper/lower bounds.
319-
320311
### errorbar-asymmetric ✅
321312
**Description:** Asymmetric error bars plot with different upper and lower error values for each data point.
322313

@@ -368,17 +359,14 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
368359
### timeseries-decomposition ✅
369360
**Description:** A time series decomposition plot showing the original series broken down into trend, seasonal, and residual components.
370361

371-
### timeseries-rolling ✅
372-
**Description:** Time series with rolling average overlay.
373-
374362
### candlestick-basic ✅
375363
**Description:** A candlestick chart displays open, high, low, and close (OHLC) price data for financial instruments over time.
376364

377365
### timeseries-ohlc 📋
378366
**Description:** Open-high-low-close bar chart.
379367

380-
### timeseries-forecast 📋
381-
**Description:** Historical data with forecast and uncertainty.
368+
### timeseries-forecast-uncertainty ✅
369+
**Description:** Time series plot with forecast line and uncertainty/confidence band.
382370

383371
### sparkline-basic ✅
384372
**Description:** A sparkline is a small, condensed line chart designed to be embedded inline with text or in dashboard cells. Pure data visualization in minimal space.
@@ -415,14 +403,14 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
415403
### wireframe-3d-basic ✅
416404
**Description:** A 3D wireframe plot displays a mathematical surface as a mesh of lines connecting grid points, creating a see-through visualization.
417405

418-
### contour-3d 📋
406+
### contour-3d
419407
**Description:** 3D contour plot.
420408

421409
### bar-3d ✅
422410
**Description:** 3D bar chart.
423411

424-
### line-3d 📋
425-
**Description:** 3D line plot or trajectory.
412+
### line-3d-trajectory ✅
413+
**Description:** 3D line plot or trajectory visualization in three-dimensional space.
426414

427415
---
428416

@@ -447,7 +435,7 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
447435
### network-basic ✅
448436
**Description:** A network graph (node-link diagram) visualizes relationships between entities as nodes connected by edges.
449437

450-
### network-directed 📋
438+
### network-directed
451439
**Description:** Directed graph with arrows.
452440

453441
### network-weighted 📋
@@ -487,9 +475,6 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
487475
### icicle-basic ✅
488476
**Description:** Rectangular hierarchy visualization with stacked rectangles.
489477

490-
### circle-packing ✅
491-
**Description:** Nested circles showing hierarchy.
492-
493478
### circlepacking-basic ✅
494479
**Description:** Circle packing chart displaying hierarchical data as nested circles.
495480

@@ -516,9 +501,6 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
516501

517502
## 20. Animation & Interactive
518503

519-
### animation-line 📋
520-
**Description:** Animated line plot building over time.
521-
522504
### scatter-animated-controls ✅
523505
**Description:** An animated scatter plot with play/pause controls, showing data evolution over time with smooth transitions.
524506

@@ -575,9 +557,6 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
575557
### wordcloud-basic ✅
576558
**Description:** A word cloud displays text data where word size represents frequency or importance.
577559

578-
### annotated-scatter ✅
579-
**Description:** Scatter plot with text labels on points.
580-
581560
### annotated-line 📋
582561
**Description:** Line plot with annotations at key points.
583562

@@ -588,9 +567,6 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
588567
### parallel-basic ✅
589568
**Description:** A parallel coordinates plot visualizes multivariate data by representing each variable as a vertical axis and each observation as a line connecting values across all axes.
590569

591-
### parallel-categories ✅
592-
**Description:** Parallel coordinates for categorical data.
593-
594570
### parallel-categories-basic ✅
595571
**Description:** Basic parallel categories plot for visualizing flows between categorical variables.
596572

@@ -619,13 +595,13 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
619595
### stock-volume 📋
620596
**Description:** Stock price with volume bars in synchronized panes.
621597

622-
### indicator-macd 📋
598+
### indicator-macd
623599
**Description:** MACD technical indicator chart.
624600

625-
### indicator-rsi 📋
601+
### indicator-rsi
626602
**Description:** Relative Strength Index indicator.
627603

628-
### indicator-bollinger 📋
604+
### indicator-bollinger
629605
**Description:** Bollinger Bands overlay on price chart.
630606

631607
### indicator-sma 📋
@@ -749,15 +725,9 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
749725
### precision-recall ✅
750726
**Description:** Precision-Recall curve for evaluating classification models, especially useful for imbalanced datasets.
751727

752-
### learning-curve ✅
753-
**Description:** Learning curve showing model performance (training and validation scores) vs training set size for bias-variance diagnosis.
754-
755728
### learning-curve-basic ✅
756729
**Description:** Model learning curve showing training and validation performance across different training set sizes.
757730

758-
### feature-importance ✅
759-
**Description:** Horizontal bar chart showing feature importances from machine learning models, sorted by importance value.
760-
761731
### calibration-curve ✅
762732
**Description:** Calibration curve (reliability diagram) visualizing how well predicted probabilities match actual outcomes for probability calibration.
763733

@@ -767,12 +737,9 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
767737
### gain-curve ✅
768738
**Description:** Cumulative gains chart for evaluating classification model effectiveness.
769739

770-
### shap-summary 📋
740+
### shap-summary
771741
**Description:** SHAP (SHapley Additive exPlanations) summary plot showing feature impact on model predictions.
772742

773-
### partial-dependence ✅
774-
**Description:** Partial dependence plot showing marginal effect of features on predicted outcome.
775-
776743
### pdp-basic ✅
777744
**Description:** Partial dependence plot showing the marginal effect of a feature on model predictions.
778745

@@ -788,9 +755,6 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
788755
### residual-plot ✅
789756
**Description:** Residual plot displaying difference between observed and predicted values for regression model diagnostics.
790757

791-
### decision-boundary ✅
792-
**Description:** Decision boundary visualization showing classifier regions in 2D feature space.
793-
794758
### contour-decision-boundary ✅
795759
**Description:** Decision boundary classifier visualization using contour plot to show classification regions.
796760

@@ -801,15 +765,9 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
801765

802766
## 29. Scientific & Domain-Specific
803767

804-
### spectrum-plot ✅
805-
**Description:** Frequency spectrum visualization.
806-
807768
### spectrum-basic ✅
808769
**Description:** Frequency spectrum plot showing signal power or amplitude across frequencies.
809770

810-
### spectrogram ✅
811-
**Description:** Time-frequency heatmap for audio/signals.
812-
813771
### spectrogram-basic ✅
814772
**Description:** Spectrogram time-frequency heatmap showing signal intensity over time and frequency.
815773

@@ -819,7 +777,7 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
819777
### quiver-basic ✅
820778
**Description:** A quiver plot displays vector fields using arrows positioned at grid points. Each arrow represents a vector at that location, with direction indicating the vector's angle and length proportional to its magnitude.
821779

822-
### streamline-basic 📋
780+
### streamline-basic
823781
**Description:** Streamlines of a vector field as smooth curves.
824782

825783
### stem-basic ✅
@@ -834,24 +792,15 @@ A comprehensive catalog of plot types for the pyplots platform. Each plot is imp
834792
### skewt-basic 📋
835793
**Description:** A Skew-T Log-P diagram displays atmospheric thermodynamic profiles with logarithmic pressure axis and 45-degree skewed temperature isotherms.
836794

837-
### survival-curve ✅
838-
**Description:** Kaplan-Meier survival analysis plot.
839-
840795
### survival-kaplan-meier ✅
841796
**Description:** Kaplan-Meier survival plot showing probability of survival over time with censored data.
842797

843798
### forest-basic ✅
844799
**Description:** Meta-analysis effect sizes with confidence intervals.
845800

846-
### volcano-plot ✅
847-
**Description:** Statistical significance vs fold change.
848-
849801
### volcano-basic ✅
850802
**Description:** Volcano plot for statistical significance showing -log10(p-value) vs fold change.
851803

852-
### manhattan-plot ✅
853-
**Description:** Genome-wide association study visualization.
854-
855804
### manhattan-gwas ✅
856805
**Description:** Manhattan plot for genome-wide association studies showing chromosomal positions vs -log10(p-values).
857806

@@ -881,8 +830,8 @@ Printable templates and playful visualizations.
881830
### sudoku-filled 📋
882831
**Description:** Sudoku-Rätsel mit vorgegebenen Zahlen und eindeutiger Lösung. Vorgegebene Zahlen optisch hervorgehoben.
883832

884-
### maze-basic 📋
885-
**Description:** Rechteckiges Labyrinth mit Start und Ziel. Algorithmisch generiert mit genau einem Lösungsweg. Schwarz-weiß zum Ausdrucken.
833+
### maze-printable ✅
834+
**Description:** Rectangular maze puzzle with start and goal, algorithmically generated with exactly one solution path.
886835

887836
### maze-circular 📋
888837
**Description:** Rundes Labyrinth aus konzentrischen Ringen. Eingang außen, Ziel im Zentrum.
@@ -895,8 +844,8 @@ Printable templates and playful visualizations.
895844

896845
### Codes & Identification
897846

898-
### qr-code 📋
899-
**Description:** QR-Code generiert aus Text oder URL. Quadratisches Muster mit Positionsmarkierungen, scanbar mit Smartphone.
847+
### qrcode-basic ✅
848+
**Description:** QR code generated from text or URL, scannable with smartphone.
900849

901850
### barcode-ean 📋
902851
**Description:** EAN-13 Barcode (europäischer Produktcode). Vertikale Striche mit 13 Ziffern darunter, scanbar im Einzelhandel.
@@ -911,9 +860,9 @@ Printable templates and playful visualizations.
911860

912861
## Statistics
913862

914-
- **Total Plot Types:** 245+
915-
- **Implemented:** 191
916-
- **Planned:** 54+ 📋
863+
- **Total Plot Types:** 242
864+
- **Implemented:** 181
865+
- **Planned:** 61 📋
917866
- **Categories:** 30
918867

919868
---

prompts/workflow-prompts/report-analysis.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,34 @@ From the issue body, extract:
1515
- **category**: Visual, Data, Functional, or Other
1616
- **description**: User's description of the issue
1717

18+
## Input Validation (Security)
19+
20+
**CRITICAL:** Before using any user-supplied values in commands, validate them:
21+
22+
1. **spec_id** must match pattern `^[a-z0-9-]+$` (lowercase letters, numbers, hyphens only)
23+
2. **library** must be one of: `matplotlib`, `seaborn`, `plotly`, `bokeh`, `altair`, `plotnine`, `pygal`, `highcharts`, `letsplot`
24+
25+
If validation fails → post comment explaining invalid input, close issue, STOP.
26+
1827
## Validation Steps
1928

20-
1. **Verify spec exists:**
21-
```bash
22-
ls plots/{spec_id}/
23-
```
24-
If not found → post comment, close issue, STOP
29+
1. **Validate spec_id format:**
30+
- Must match `^[a-z0-9-]+$`
31+
- If invalid → post comment, close issue, STOP
2532

26-
2. **If implementation issue, verify library exists:**
27-
```bash
28-
ls plots/{spec_id}/implementations/{library}.py
29-
```
30-
If not found → post comment, close issue, STOP
33+
2. **Verify spec exists:**
34+
- Check if directory `plots/{spec_id}/` exists
35+
- If not found → post comment, close issue, STOP
3136

32-
3. **Read relevant files:**
37+
3. **If implementation issue, verify library exists:**
38+
- Check if file `plots/{spec_id}/implementations/{library}.py` exists
39+
- If not found → post comment, close issue, STOP
40+
41+
4. **Read relevant files:**
3342
- `plots/{spec_id}/specification.md`
3443
- `plots/{spec_id}/metadata/{library}.yaml` (if impl)
3544

36-
4. **Analyze the issue:**
45+
5. **Analyze the issue:**
3746
- Is this a legitimate issue or misunderstanding?
3847
- Does the described problem match what's in the spec/metadata?
3948
- What might be the root cause?
@@ -83,12 +92,11 @@ After posting the comment, update labels:
8392

8493
## Title Update
8594

86-
Update the issue title to include the spec ID:
87-
```bash
88-
gh issue edit {number} --title "[{spec_id}] {brief description of the issue}"
89-
```
95+
Update the issue title to format: `[{spec_id}] {brief description}`
96+
97+
Example: `[qrcode-basic] QR code not scannable`
9098

91-
Keep the description under 60 characters.
99+
Keep the description under 60 characters. Only use the validated spec_id.
92100

93101
## Important Notes
94102

0 commit comments

Comments
 (0)