Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docksec/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
import os
import argparse
from typing import NoReturn, Optional
from typing import Optional

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'Optional' is not used.

def get_version() -> str:
"""Return the installed package version.
Expand All @@ -21,7 +21,7 @@

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:
Expand Down
8 changes: 0 additions & 8 deletions docksec/docker_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions docksec/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
],
Expand Down
Loading