ベータ Shoulder はベータ版です — 結果が誤っている場合があります。皆さまのフィードバックが次に修正する内容を決定します。 フィードバックを送る
📦

Dependency on Vulnerable Third-Party Component

🛡️ 3 件のルールが検出します

Dependency on Vulnerable Third-Party Component

The product uses a third-party component that contains one or more known vulnerabilities.

Using vulnerable dependencies exposes the application to known exploits. Container images and application dependencies should be regularly scanned and updated.

普及度
頻繁に悪用される
影響度
ミディアム
レビュー推奨
予防
文書化済み
3 件の修正例
2 予防
2 予防

この脆弱性の修正方法

3 件の Shoulder 検出ルールに基づく Dependency on Vulnerable Third-Party の予防策。

Docker apt-get Missing Cache Cleanup LOW

Clean apt cache in the same RUN layer to reduce image size

+3 -1 dockerfile
  FROM ubuntu:22.04
- RUN apt-get update && apt-get install -y --no-install-recommends curl
+ RUN apt-get update && \
+     apt-get install -y --no-install-recommends curl && \
+     rm -rf /var/lib/apt/lists/*
  
Docker apt-get Missing --no-install-recommends LOW

Add --no-install-recommends to apt-get install to minimize image size

+1 -1 dockerfile
  FROM ubuntu:22.04
- RUN apt-get update && apt-get install -y curl
+ RUN apt-get update && apt-get install -y --no-install-recommends curl
  
Docker apt-get Missing -y Flag LOW

Add -y flag to apt-get install for non-interactive Docker builds

+1 -1 dockerfile
  FROM ubuntu:22.04
- RUN apt-get update && apt-get install curl
+ RUN apt-get update && apt-get install -y curl
  
3 検出
3 検出

コードの脆弱性を見つける

Shoulderを使用してコードのDependency on Vulnerable Third-Party Componentパターンをスキャンしましょう。 3 ルール.

ターミナル
# Scan with Shoulder CLI
npx @shoulderdev/cli trust --cwe=1395

# Or scan entire project
npx @shoulderdev/cli trust .
4 警告サイン
4 警告サイン

コードレビューで注目すべき点

これらのパターンはDependency on Vulnerable Third-Party Componentの潜在的な脆弱性を示しています。コードレビューとセキュリティ監査中に探してください。

🔵
apt-get without cache cleanup increases image size docker-apt-missing-cache-cleanup
🔵
apt-get commands without cache cleanup in the same RUN layer docker-apt-missing-cache-cleanup
🔵
apt-get without --no-install-recommends increases image size docker-apt-missing-no-install-recommends
🔵
apt-get install commands without --no-install-recommends flag docker-apt-missing-no-install-recommends
🔵
apt-get install without -y flag may hang waiting for input docker-apt-missing-y-flag
🔍

コードベースをスキャン: Dependency on Vulnerable Third-Party Component

Shoulder CLI はコードベース全体から脆弱なパターンを見つけます。