diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f704df4..d248da1 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ebb8360..1b59b6d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -57,7 +57,7 @@ jobs: # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # Add any setup steps before running the `github/codeql-action/init` action. # This includes steps like installing compilers or runtimes (`actions/setup-node` diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 40928a1..ec94048 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,7 +13,7 @@ jobs: name: Test Coverage Report steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 44ad0e6..2011f39 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 6d912fd..22995ad 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up Python uses: actions/setup-python@v6 diff --git a/docksec/cli.py b/docksec/cli.py index 6f64072..b1c5fcc 100644 --- a/docksec/cli.py +++ b/docksec/cli.py @@ -3,7 +3,7 @@ import sys import os import argparse -from typing import NoReturn, Optional +from typing import Optional def get_version() -> str: """Return the installed package version. @@ -21,7 +21,7 @@ def get_version() -> str: try: import re - setup_path = os.path.join(os.path.dirname(__file__), 'setup.py') + setup_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'setup.py') with open(setup_path, 'r') as f: match = re.search(r'version="([^"]+)"', f.read()) if match: diff --git a/docksec/docker_scanner.py b/docksec/docker_scanner.py index 52676b1..309327f 100644 --- a/docksec/docker_scanner.py +++ b/docksec/docker_scanner.py @@ -2,14 +2,12 @@ import json import subprocess import csv -import pandas as pd import logging from typing import List, Tuple, Dict, Optional from datetime import datetime from fpdf import FPDF import sys import re -import shlex from pathlib import Path from docksec.config import RESULTS_DIR from docksec.config import docker_score_prompt @@ -1057,12 +1055,6 @@ def save_results_to_html(self, results: Dict) -> str: template_path = os.path.join(os.path.dirname(__file__), 'report_template.html') try: - # # Read the HTML template - # if not os.path.exists(template_path): - # raise FileNotFoundError(f"HTML template not found at {template_path}") - # - # with open(template_path, 'r', encoding='utf-8') as f: - # html_template = f.read() from docksec.config import html_template # Prepare template variables diff --git a/docksec/utils.py b/docksec/utils.py index 3edeafe..4a80c08 100644 --- a/docksec/utils.py +++ b/docksec/utils.py @@ -31,8 +31,7 @@ except ImportError: OLLAMA_AVAILABLE = False from docksec.config import ( - BASE_DIR, - OPENAI_API_KEY + BASE_DIR ) try: from pydantic import BaseModel, Field @@ -44,7 +43,7 @@ "Either 'pydantic' or 'langchain-core' must be installed. " "Install with: pip install pydantic langchain-core" ) -from typing import List, Optional, Any +from typing import List, Optional import time from tqdm import tqdm from colorama import Fore, Style, init diff --git a/requirements.txt b/requirements.txt index 7bb212c..d1bf339 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,16 +6,16 @@ langchain-openai==0.2.10 langchain-anthropic==0.3.0 langchain-google-genai==2.0.5 langchain-ollama==0.2.0 -python-dotenv==1.0.1 +python-dotenv==1.2.2 pandas==3.0.2 # UI and progress -tqdm==4.67.1 +tqdm==4.67.3 colorama==0.4.6 rich==15.0.0 # PDF generation -fpdf2==2.8.1 +fpdf2==2.8.7 # Retry logic tenacity==9.1.4 diff --git a/setup.py b/setup.py index 88645f2..032644b 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,13 @@ from setuptools import setup, find_packages +with open("README.md", "r", encoding="utf-8") as fh: + long_description = fh.read() + setup( name="docksec", version="2026.5.6", description="AI-Powered Docker Security Analyzer", - long_description=open("README.md").read(), + long_description=long_description, long_description_content_type="text/markdown", author="Advait Patel", url="https://github.com/advaitpatel/DockSec", @@ -28,12 +31,12 @@ "langchain-anthropic==0.3.0", "langchain-google-genai==2.0.5", "langchain-ollama==0.2.0", - "python-dotenv==1.0.1", + "python-dotenv==1.2.2", "pandas==3.0.2", - "tqdm==4.67.1", + "tqdm==4.67.3", "colorama==0.4.6", "rich==15.0.0", - "fpdf2==2.8.1", + "fpdf2==2.8.7", "tenacity==9.1.4", "setuptools>=65.0.0", ],