모듈 취약점을 점검하자 npm audit

염정민
염정민
Nov 6 · 3 min read
npmjs.com

안녕하세요. Humanscape 개발자 Jake입니다.

npm에는 개발자의 편의를 위해 여러가지 command를 제공합니다. (아래 그림에 나온 command 외 에도 많은 command 가 있습니다)

docs.npmjs.com

npm을 사용하여 개발을 하시면서 내가 사용하고 있는 외부모듈이 문제점을 갖고 있지 않을까 생각해본적 있으실거라 생각합니다. 오늘은 이러한 부담감을 조금 덜어줄 수 있는 기능을 소개할까 합니다.

위쪽 이미지를 보시면 Run a security audit 에 해당하는 audit 이 앞에서 얘기한 보안감사의 기능을 갖고 있는데요. 사용법은 간단합니다.

npmjs.com

프로젝트 root 경로에서 npm audit 를 입력하면 프로젝트에서 사용하고 있는 모듈의 취약점에 대해서 알려줍니다.

npm audit은 취약점을 찾아주는것과 더불어 간단한 수정도 가능합니다.

npmjs.com

npm audit fix 는 취약점을 가진 종속성에 대해 호환되는 버전으로 자동으로 업데이트를 해줍니다.

npm audit fix로 해결되지 않은 취약점은 More info 에서 제공되는 정보로 해결책을 참고할 수 있습니다.

오늘 말씀드린 내용으로 보안에 대해서 완벽하게 대응을 했다고 할 수는 없습니다. 하지만 개발자가 알고 있는 선에서는 미리미리 잘 준비하여 완성도 높은 프로젝트를 만들어 나가는것이 개발자의 해야할 일이라고 생각합니다.

기본적인 내용부터 잘준비하셔서 건강한프로젝트 만드시길 바랍니다.

감사합니다.

Get to know us better!
Join our official channels below.

Telegram(EN) : t.me/Humanscape
KakaoTalk(KR) : open.kakao.com/o/gqbUQEM
Website : humanscape.io
Medium : medium.com/humanscape-ico
Facebook : www.facebook.com/humanscape
Twitter : twitter.com/Humanscape_io
Reddit : https://www.reddit.com/r/Humanscape_official
Bitcointalk announcement : https://bit.ly/2rVsP4T
Email : support@humanscape.io

humanscape-tech

Tech blog

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade