Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9b53168
Blint-Action (#38)
cerrussell Jul 11, 2023
eff8ac6
Fix parsing of GHA sources
cerrussell Jul 11, 2023
2feb6e1
Update cli.py
cerrussell Jul 11, 2023
96b7529
bump version
cerrussell Jul 11, 2023
31bedda
bump version
cerrussell Jul 11, 2023
42b4c65
Fix parsing of sources
cerrussell Jul 11, 2023
6f11a00
bump version
cerrussell Jul 11, 2023
a45d917
bump version
cerrussell Jul 11, 2023
08ed8f4
Remove WORKDIR
cerrussell Jul 11, 2023
2b71a8d
bump version
cerrussell Jul 11, 2023
a84f64f
Fix variable name
cerrussell Jul 11, 2023
34c7e68
Update Dockerfile
cerrussell Jul 11, 2023
2d05c18
Update pyproject.toml
cerrussell Jul 11, 2023
744c6e1
Update parse sources
cerrussell Jul 11, 2023
86e227b
Update Dockerfile
cerrussell Jul 11, 2023
97c0e43
Troubleshooting env
cerrussell Jul 12, 2023
6cfa911
Fix syntax error
cerrussell Jul 12, 2023
7a6a804
Update Dockerfile
cerrussell Jul 12, 2023
84e2879
Parse src_dir regardless
cerrussell Jul 12, 2023
cf4f628
Pass env variable in entrypoint
cerrussell Jul 12, 2023
715610e
Update Dockerfile
cerrussell Jul 12, 2023
d66aa7d
Change deployment service permissions
cerrussell Jul 12, 2023
ccb6d9a
Cleanup
cerrussell Jul 12, 2023
19b1997
Add option for github actions
cerrussell Jul 12, 2023
3878a3a
Update cli.py
cerrussell Jul 12, 2023
777213f
Update parsing
cerrussell Jul 12, 2023
fc21e7e
Troubleshooting
cerrussell Jul 12, 2023
1e5d69c
Update cli.py
cerrussell Jul 12, 2023
9470aa0
Troubleshooting
cerrussell Jul 12, 2023
6eacec7
Remove extra empty list entry
cerrussell Jul 12, 2023
4de8477
Version
cerrussell Jul 12, 2023
d170d12
Version
cerrussell Jul 12, 2023
dd33994
Variable refactoring
cerrussell Jul 12, 2023
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
14 changes: 6 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LABEL maintainer="appthreat" \
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
org.opencontainers.image.source="https://github.com/AppThreat/blint" \
org.opencontainers.image.url="https://github.com/AppThreat/blint" \
org.opencontainers.image.version="1.0.32" \
org.opencontainers.image.version="1.0.33" \
org.opencontainers.image.vendor="AppThreat" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.title="blint" \
Expand All @@ -31,25 +31,23 @@ ENV GOPATH=/opt/app-root/go \
SBT_HOME="/opt/sbt/${SBT_VERSION}" \
COMPOSER_ALLOW_SUPERUSER=1 \
PYTHONUNBUFFERED=1 \
PYTHONIOENCODING="utf-8"
PYTHONIOENCODING="utf-8"
ENV PATH=${PATH}:${JAVA_HOME}/bin:${MAVEN_HOME}/bin:${GRADLE_HOME}/bin:${SBT_HOME}/bin:${GOPATH}/bin:/usr/local/go/bin:/usr/local/bin/:/root/.local/bin:

COPY . /opt/blint

RUN microdnf install -y python3.11 python3.11-devel python3.11-pip gcc gcc-c++ libstdc++-devel glibc-common cmake openssl-libs compat-openssl11 \
RUN microdnf install -y python3.11 python3.11-devel python3.11-pip \
&& alternatives --install /usr/bin/python3 python /usr/bin/python3.11 1 \
&& python3 --version \
&& python3 -m pip install --upgrade pip \
&& python3 -m pip install setuptools --upgrade \
&& python3 -m pip install scikit-build \
&& python3 -m pip install cmake==3.16.3 ninja==1.10.0.post2
&& python3 -m pip install poetry

RUN cd /opt/blint \
&& python3 -m pip install -e . \
&& poetry config virtualenvs.create false \
&& poetry install --no-cache --without dev \
&& chmod a-w -R /opt \
&& microdnf clean all


WORKDIR /app

ENTRYPOINT [ "blint" ]
19 changes: 17 additions & 2 deletions blint/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import argparse
import os
import sys

from blint.analysis import report, start

Expand Down Expand Up @@ -69,11 +70,21 @@ def build_args():
return parser.parse_args()


def parse_input(src):
path = src[0]
result = path.split("\n")
result.pop()
return result


def main():
args = build_args()
if not args.no_banner:
print(blint_logo)
src_dir = args.src_dir_image
if not os.getenv("CI"):
src_dir = args.src_dir_image
else:
src_dir = parse_input(args.src_dir_image)
if args.reports_dir:
reports_dir = args.reports_dir
elif not src_dir:
Expand All @@ -86,14 +97,18 @@ def main():
exit()
for dir in src_dir:
if not os.path.exists(dir):
print(f"{src_dir} is an invalid file or directory!")
print(f"{dir} is an invalid file or directory!")
return
# Create reports directory
if reports_dir and not os.path.exists(reports_dir):
os.makedirs(reports_dir)
findings, reviews, files, fuzzables = start(args, src_dir, reports_dir)
report(args, src_dir, reports_dir, findings, reviews, files, fuzzables)

if os.getenv("CI"):
if len(findings) > 0:
sys.exit(1)


if __name__ == "__main__":
main()
Loading