Projects STRLCPY flan Commits 23a98012
🤬
  • ■ ■ ■ ■ ■ ■
    .dockerignore
     1 +.git
     2 + 
  • ■ ■ ■ ■ ■ ■
    Dockerfile
    1  -FROM python:3.5-alpine
     1 +FROM python:3.9-alpine
    2 2   
    3  -RUN apk add --no-cache nmap nmap-scripts git
    4  -COPY requirements.txt /
    5  -RUN pip install --no-cache-dir -r requirements.txt
    6  - 
    7  -RUN git clone https://github.com/vulnersCom/nmap-vulners /usr/share/nmap/scripts/vulners && nmap --script-updatedb
    8  -RUN mkdir /shared
    9  - 
    10  -COPY run.sh output_report.py gcp_push.py aws_push.py /
     3 +COPY aws_push.py gcp_push.py output_report.py requirements.txt run.sh /
    11 4  COPY contrib /contrib
    12 5  COPY shared /shared
    13 6   
    14  -RUN chmod +x /run.sh
     7 +RUN apk add --no-cache nmap nmap-scripts git && \
     8 + pip install --no-cache-dir -r requirements.txt && \
     9 + git clone https://github.com/vulnersCom/nmap-vulners \
     10 + /usr/share/nmap/scripts/vulners && \
     11 + nmap --script-updatedb && \
     12 + apk del git && \
     13 + chmod +x /run.sh
    15 14   
    16  -ENTRYPOINT ["/run.sh"]
     15 +ENTRYPOINT ["/bin/sh","-c","/run.sh"]
    17 16   
  • ■ ■ ■ ■ ■ ■
    Makefile
    1 1  build :
    2  - docker build -t flan_scan .
     2 + docker build --no-cache -t flan_scan -f Dockerfile .
    3 3   
    4 4  container_name = flan_$(shell date +'%s')
    5 5  start :
    6  - docker run --name $(container_name) -v "$(CURDIR)/shared:/shared:Z" flan_scan
     6 + docker run --rm --cap-drop=all --cap-add=NET_RAW --name $(container_name) -v "$(CURDIR)/shared:/shared:Z" flan_scan
    7 7   
    8 8  md :
    9  - docker run --name $(container_name) -v "$(CURDIR)/shared:/shared:Z" -e format=md flan_scan
     9 + docker run --rm --cap-drop=all --cap-add=NET_RAW --name $(container_name) -v "$(CURDIR)/shared:/shared:Z" -e format=md flan_scan
    10 10   
    11 11  html :
    12  - docker run --name $(container_name) -v "$(CURDIR)/shared:/shared:Z" -e format=html flan_scan
     12 + docker run --rm --cap-drop=all --cap-add=NET_RAW --name $(container_name) -v "$(CURDIR)/shared:/shared:Z" -e format=html flan_scan
    13 13   
    14 14  json :
    15  - docker run --name $(container_name) -v "$(CURDIR)/shared:/shared:Z" -e format=json flan_scan
     15 + docker run --rm --cap-drop=all --cap-add=NET_RAW --name $(container_name) -v "$(CURDIR)/shared:/shared:Z" -e format=json flan_scan
     16 + 
Please wait...
Page is in error, reload to recover