트러블슈팅
npm의 패키지를 설치하고 계속 프로젝트를 진행하던도중
배포를 맡은 팀원으로부터 보안이슈에 대한 경고메세지가 있다는 소리를 듣고 수정을 시작하였습니다.
팀원이 보낸 경고 메세지는
npm 설치시 이런 에러가 계속해서 나온다는 것이었는데

npm audit 를 쳐서 보니
No fix available
node_modules/passport-kakao/node_modules/passport-oauth2
passport-kakao *
Depends on vulnerable versions of passport-oauth2
node_modules/passport-kakao
3 vulnerabilities (2 moderate, 1 critical)
To address issues that do not require attention, run:
npm audit fix
이러한 에러가 뜨고있었고
passport 카카오쪽에서 문제가 생기고있었습니다.
또한 passport-oauth2 이쪽에서도 문제가 생기고있었는데 문제를 해결하기 위해서
npm install passport-oauth2@latest
npm install passport-kakao@latest
이 명령어를 쳣지만 npm 에 아직 올라와있지 않아서 업데이트가 제대로 되지 않았습니다.
npm 에 업데이트 가 되지 않은 버전을 받기 위해서
1.git clone https://github.com/jaredhanson/passport-oauth2.git 명령어를 실행하여 passport-oauth2 모듈을 로컬에 복사합니다.
2.cd passport-oauth2 명령어를 실행하여 passport-oauth2 모듈 디렉토리로 이동합니다.
3.npm install 명령어를 실행하여 passport-oauth2 모듈의 의존성을 설치합니다.
- npm install 를 설치하면
9 vulnerabilities (1 moderate, 4 high, 4 critical)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
이러한 에러들이 뜬다
npm audit fix --force 명령어로 에러 해결
4.npm run build 명령어를 실행하여 passport-oauth2 모듈을 빌드합니다. 이건 사용이 안됨
5.npm install 명령어를 실행하여 빌드된 passport-oauth2 모듈을 설치합니다.
이 순서대로 터미널에 입력해서 assport-oauth2 모듈을 직접 빌드하여 설치 하였습니다.
GitHub - jaredhanson/passport-oauth2: OAuth 2.0 authentication strategy for Passport and Node.js.
OAuth 2.0 authentication strategy for Passport and Node.js. - GitHub - jaredhanson/passport-oauth2: OAuth 2.0 authentication strategy for Passport and Node.js.
github.com
$ npm audit
found 0 vulnerabilities
그 이후 보안이슈가 사라진 모습입니다.