Skip to content

Conversation

@bjk7119
Copy link
Contributor

@bjk7119 bjk7119 commented Sep 17, 2025

Description

  • Use Dependency-check v12.1.7 to analyze .jar
  • Auto installation of dependency-check

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Refactoring, Maintenance
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@bjk7119 bjk7119 requested a review from soimkim September 17, 2025 08:43
@bjk7119 bjk7119 self-assigned this Sep 17, 2025
@bjk7119 bjk7119 added the chore [PR/Issue] Refactoring, maintenance the code label Sep 17, 2025
@bjk7119 bjk7119 force-pushed the new_change_dc branch 2 times, most recently from b56dc03 to 6304925 Compare September 22, 2025 04:02
@bjk7119 bjk7119 changed the title Use Dependency-check v12.1.3 to analyze .jar Use Dependency-check v12.1.7 to analyze .jar Oct 17, 2025
@dd-jy
Copy link
Contributor

dd-jy commented Oct 17, 2025

@bjk7119
dependency-check 기존 pypi 패키지는 최신 버전이 없어서 삭제하고, 최신 버전 사용하기 위해 jar 다운로드 받아서 사용하고자 수정하신 것이 맞는지요?
수정 방향에 대해 설명 부탁드립니다.
env 변수명을 가져다가 쓰는 부분이 있는데, FL binary에서 어떻게 가져다 쓰는건지 설명 부탁드립니다.
(만약 env 안쓴다면 해당 부분은 삭제되어야 할 것 같아서 문의드립니다.)

@bjk7119
Copy link
Contributor Author

bjk7119 commented Oct 17, 2025

@dd-jy
dependency-check 기존 pypi 패키지는 최신 버전이 없어서 삭제하고, 최신 버전 사용하기 위해 jar 다운로드 받아서 사용하고자 수정하신 것이 맞는지요?
-> 네 맞습니다.

Dependency-check를 사용하여 .jar파일을 분석하고 얻는 결과는 이전과 동일합니다.
그러나 앞으로는 말씀하신 것처럼 pypi 패키지를 걷어내고 최신 버전의 binary를 받아 설치 & 실행하는 방식으로 변경되었습니다.

사용한 환경 변수는 다음과 같습니다.

  1. FOSSLIGHT_SKIP_AUTO_INSTALL
  • 목적: 실행 환경(특히 배포된 실행파일)에서 dependency-check 자동 다운로드/설치를 비활성화
  • 읽는 시점: _install_dependency_check()시작 직후
  • 값 판단: '1','true','yes' (소문자 비교) 중 하나면 자동 설치 건너뜀
  • 사용 방법: 실행 전에 쉘에서 설정 Linux/macOS: export FOSSLIGHT_SKIP_AUTO_INSTALL=1 Windows(cmd): set FOSSLIGHT_SKIP_AUTO_INSTALL=1 Windows(PowerShell): $env:FOSSLIGHT_SKIP_AUTO_INSTALL='1'
  1. DEPENDENCY_CHECK_HOME
  • 목적:
    • 읽을 때: 사용자가 직접 지정한 기존 설치 위치를 존중(이미 bin/* 존재하면 그대로 사용)
    • 쓸 때: 코드가 설치한 dependency-check 루트 경로를 다른 모듈/프로세스가 재사용하도록 알림
  • 읽는 시점: 설치 경로 결정 초반 (env_home)
  • 쓰는 시점: 설치가 이미 되어 있거나 새로 설치 완료 후
  • 사용 방법:
    • 미리 지정(기존 설치 활용): export DEPENDENCY_CHECK_HOME=/path/to/dependency-check
    • 설치 후 자동 설정: 코드가 os.environ['DEPENDENCY_CHECK_HOME'] = <설치경로> 지정
    • 값 형태:
      • 기존 설치: dependency-check 디렉토리 자체 (…/dependency-check)
      • 새 설치: 내부 로직에서 base + 'dependency-check' 결정 후 저장
  1. DEPENDENCY_CHECK_VERSION
  • 목적: 현재 사용/설치된 dependency-check 버전(고정 상수 DEPENDENCY_CHECK_VERSION)을 외부에서 참조 가능하게 제공
  • 쓰는 시점: dependency-check 확인 성공 또는 설치 완료 후
  • 사용 방법:
    • 코드에서 자동 설정: os.environ['DEPENDENCY_CHECK_VERSION'] = '12.1.7'
    • 외부 스크립트에서 참조: echo $DEPENDENCY_CHECK_VERSION (Linux/macOS), echo %DEPENDENCY_CHECK_VERSION% (Windows cmd)

Copy link
Contributor

@dd-jy dd-jy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bjk7119
사용자 가이드에 env 관련하여 작성해주시기 바랍니다.

@bjk7119 bjk7119 merged commit 151d159 into main Oct 22, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore [PR/Issue] Refactoring, maintenance the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants