T09 · Insecure Skill Coding Practices
- Location
scripts/main.py:405- Finding
Path Traversal Through Gene-Derived Output Filenames
- Content
View full analysis
10: from scipy.interpolate import UnivariateSpline idx = np.argsort(pseudotime[mask]) x = pseudotime[mask][idx] y = expression[mask][idx] try: spline = UnivariateSpline(x, y, s=len(x)) x_smooth = np.linspace(x.min(), x.max(), 100) ax.plot(x_smooth, spline(x_smooth), linewidth=2, label=f'{lineage} trend') except: pass ax.set_xlabel('Pseudotime') ax.set_ylabel(f'{gene} Expression') ax.set_title(f'{gene} Expression along Trajectory') ax.legend(loc='best') output_path = os.path.join(gene_trends_dir, f'{gene}_trend.{args.format}') plt.tight_layout() plt.savefig(output_path, dpi=args.dpi, bbox_inches='tight') ``` ### Technical Anal ...[truncated 2217 chars]- Remediation
View remediation
