1© 2017 Rogue Wave Software, Inc. All Rights Reserved. 1
Klocwork 2017.1
2© 2017 Rogue Wave Software, Inc. All Rights Reserved. 2
Rogue Wave
Klocwork 2017.1
のご紹介
Masaru Horioka
Sales Engineering Manager, APAC
Rogue Wave Software
3© 2017 Rogue Wave Software, Inc. All Rights Reserved. 3
はじめに
• Klocwork開発チームはアジャイル開発体制をとっており、1年に1回のメ
ジャーバージョンアップ、および3ヶ月ごとのマイナーバージョンアップ
ににより、新機能の追加、機能改善、バグフィクスを行っています。
• 新バージョンを利用するためには有効なサブスクリプション契約または保
守契約が必要です。
– メジャーバージョンアップの際にはライセンスファイルが変更され
ます。
– 永久ライセンスをお持ちのお客様で、有効な保守契約をお持ちで無
い場合、新バージョン用のライセンスは発行されませんのでご注意
ください。
4© 2017 Rogue Wave Software, Inc. All Rights Reserved. 4
重要な変更
5© 2017 Rogue Wave Software, Inc. All Rights Reserved. 5
ライセンスサーバーの動作要件の変更
• Klocwork 2017 向けのライセンスが必要になります。ライセンスの入手は Klocwork担当
営業、または販売代理店にご連絡ください。
• Klocwork 2017向けライセンスはKlocwork 11.x 以前のライセンスサーバーでは動作しま
せん。
– Klocwork 2017のライセンスサーバーまたは、FlexNet Publisher 2016 R1
(11.14.0.2) 以降のライセンスサーバーをご利用ください。
• Klocwork 2017.xにおいて, dongleライセンスが動作しない不具合が報告されています。
対応方法ついてはKlocwork supportまでご連絡ください。 (2017.2にて正式な修正が予定
されています。)
– 注意:Dongleライセンスは Windows および Redhat Linux (Ubuntuは対象外)と
なっております。
– https://support.roguewave.com/documentation/klocwork/jp/current/supportedplatfor
ms/
• Linux上で追加パッケージのインストールが必要になります。
– 詳細は "Licensing requirements" をご確認ください。
https://support.roguewave.com/documentation/klocwork/jp/current/supportedplatfor
ms/
6© 2017 Rogue Wave Software, Inc. All Rights Reserved. 6
Klocwork 2017.1の新機能
7© 2017 Rogue Wave Software, Inc. All Rights Reserved. 7
Klocwork 2017.1 (12.1) の新機能のま
とめ
• 新しいセキュリティレポート
– 開発リーダー向けにプロジェクトに残存する代表的なセキュリティリスク
を見える化
• 解析エンジンの改善
– 新しいJavaセキュリティチェッカー
– MISRA C 2012のチェッカーの追加
– CERT-C/C++ 2016向け分類基準アップデート
– C# 6.0フルサポート
• 新しいプラットフォーム対応
– Visual Studio 2017
– コンパイラ/OSの追加サポート
• その他
– "update_status" APIの利用制限解除
– Android Nプラットフォーム解析におけるJackコンパイラサポートの改善
(ただし特別なスクリプトをサポートから入手する必要あり)
8© 2017 Rogue Wave Software, Inc. All Rights Reserved. 8
新しいセキュリティレポート
9© 2017 Rogue Wave Software, Inc. All Rights Reserved. 9
新しいセキュリティレポート
• 背景
– セキュリティの観点での静的解析実行の必要性の増加
– 開発早期段階からのセキュリティ問題を作り込まない開発プロセスが重
要
– 多くの開発チームがCWE, CERT, OWASP, DISA STIGのいずれかを採用
している
• ゴール
– 開発の早期段階からセキュリティリスクを見える化
– リスクの高い課題を抽出し、対応の優先順位付けを支援
• 提供する機能
– CWE Top 25, CERT-C, DISA-STIGの観点からセキュリティリスクを見え
る化するビルトインレポートの提供
– 指摘数のトレンド、指摘の多い脆弱性パターン、指摘の多いソースコー
ドディレクトリを表示
10© 2017 Rogue Wave Software, Inc. All Rights Reserved. 10
新しいセキュリティレポート
開発リーダー向けにセキュリティリスクを見える化
プロジェクトに残存す
る脆弱性パターントッ
プ3の指摘数の推移
最新の解析で最も指摘
数の多い脆弱性トップ
3
指摘数が多いディレク
トリ
11© 2017 Rogue Wave Software, Inc. All Rights Reserved. 11
セキュリティレポートの作成(1)
"新規レポートの作成"をクリックし"セキュリティ"を選択
前提条件: プロジェクトの”構成”タブからセキュリティ分類基準 (CWE, CERT,
OWASP, または DISA-STIG) をインポート済みであること
12© 2017 Rogue Wave Software, Inc. All Rights Reserved. 12
セキュリティレポートの作成(2)
レポートの対象開発期間と使用するセキュリティ分類基準を選択
レポート作成対
象期間を選択
分類基準を選択
13© 2017 Rogue Wave Software, Inc. All Rights Reserved. 13
詳細なレポートが必要な場合既存の"Category
detail report(カテゴリ別詳細)" を参照
14© 2017 Rogue Wave Software, Inc. All Rights Reserved. 14
ビデオ: Reporting with Klocwork(英
語)
• https://www.klocwork.com/resources/videos/reporting-with-klocwork
15© 2017 Rogue Wave Software, Inc. All Rights Reserved. 15
Klocwork 2017.1における
解析エンジンの改善
16© 2017 Rogue Wave Software, Inc. All Rights Reserved. 16
解析エンジンの改善 − まとめ
• 新しい Javaセキュリティチェッカー
– OWASP TOP 10-A6/CWE-311: Missing Encryption of Sensitive Data.
– OWASP TOP 10-A8/CWE-352: Cross-Site Request Forgery.
• 新しい MISRA C 2012 チェッカー
– Rule 4.1(Required): Octal and hexadecimal escape sequences shall be terminated
– Rule 5.4(Required): Macro identifiers shall be distinct
– Rule 17.6(Mandatory): The declaration of an array parameter shall not contain the
static keyword between the [ ]
– Rule 22.4(Mandatory): There shall be no attempt to write to a stream which has
been opened as read-only.
• CERT-C/C++ 2016向け分類基準のアップデート
– 自動車業界での CERT-Cの採用ケースが増加
– デフォルトチェッカーでは91 rule/recommendation をサポート(カバー率 約3
0%)
• カスタムチェッカーによりカバー率の向上は可能
• C# 6.0 フルサポート
17© 2017 Rogue Wave Software, Inc. All Rights Reserved. 17
Javaチェッカー: OWASP Top 10-A6/CWE-
311: Missing Encryption of Sensitive Data
Checker Description Default Severity Enabled by
default?
Tunable?
SV.SENSITIVE
.DATA
暗号化されて
いない機密情
報の書き込み
2 true Yes
SV.SENSITIVE
.OBJ
暗号化されて
いないオブ
ジェクトデー
タの保存
2 true Yes
18© 2017 Rogue Wave Software, Inc. All Rights Reserved. 18
例: SV.SENSITIVE.DATA
変数名からセンシティブ
データを推測 (カスタマ
イズ可能)
暗号化しないまま
ファイルへの書き
込みを検出暗号化に使用する
関数を jkbファイ
ルで登録
19© 2017 Rogue Wave Software, Inc. All Rights Reserved. 19
JKBファイル例
SensitiveDatatest.encrypt() の戻り値は暗号化済みであると登録
参照:
https://support.roguewave.com/documentation/klocwork/jp/current/javaknowled
gebasereference/#concept473
20© 2017 Rogue Wave Software, Inc. All Rights Reserved. 20
Java チェッカー: OWASP TOP 10-
A8/CWE-352: Cross-Site Request Forgery.
Checker Description Default Severity Enabled by
default?
Tunable?
SV.CSRF.GET GET リクエ
スト中の
CSRF トー
クン
4 false Yes
SV.CSRF.ORIGI
N
オリジン
チェックな
しの要求ハ
ンドラ
4 false Yes
SV.CSRF.TOKEN CSRF
チェックな
しの状態変
更要求ハン
ドラ
4 false Yes
21© 2017 Rogue Wave Software, Inc. All Rights Reserved. 21
例:SV.CSRF.ORIGIN
リクエストヘッダにおいて"Origin"
または "Referer" をチェックしてい
るかどうか確認
22© 2017 Rogue Wave Software, Inc. All Rights Reserved. 22
CERT-C/C++ 2016向け分類基準のアップ
デート
• CERT-C/C++ 2016向けマッピングの改善により50以上のルールを追加サ
ポート
• Klocwork マニュアルの更新
• https://support.roguewave.com/documentation/klocwork/jp/current/certcandcs
ecurecodingstandardidsmappedtoklocworkcandccheckers/
• TCERT公式Webサイト内のKlocwork情報も合わせて更新
• https://www.securecoding.cert.org/confluence/display/c/Klocwork
23© 2017 Rogue Wave Software, Inc. All Rights Reserved. 23
Klocwork 2017.1における
追加プラットフォームサポート
その他の改善
24© 2017 Rogue Wave Software, Inc. All Rights Reserved. 24
追加プラットフォームサポート
その他の改善
• Visual Studio extension(vsixプラグイン)の改善
– Visual Studio 2017サポート
– 安定性とパフォーマンスの改善
• コンパイラ・ビルド環境サポートの改善
– 新サポート: Microchip MPLAB XC8 C
– 改善: GNU, Microsoft Visual C++, Synopsys ARC MetaWare
– Gradle version 3.41までサポート対象
• Web API
– "update_status" API の利用制約を撤廃
• APIの仕様例
https://support.roguewave.com/documentation/klocwork/jp/current/examples
2/#Example:Updateissuestatus
• その他の重要な改善
– プロジェクトの "import"機能でデータ不整合が発生するバグを修正
– Android N Jack のサポート
25© 2017 Rogue Wave Software, Inc. All Rights Reserved. 25
Android N におけるJackコンパイラを利
用したJava 解析の改善
• 問題
– Android Nプラットフォーム開発環境で、Jackコンパイラを使用している場合、解
析に必要なjarが生成されてない事が原因で、 kwbuildproject 実行時に、
"Unresolved import", "Unresolved method", and "Unresolved name" が発生し、解
析精度に問題がある。
• 回避策
– 必要なjarファイルを生成するための、特別なスクリプトを提供する。このスクリ
プトはkwinjectの後、kwbuildprojectコマンド以前に実行する。詳細はKlocwork サ
ポートチケットにて提供する。
注意: Google社は"jack" コンパイラの使用をdeprecated扱いにすることをアナウンスしてい
ます。このアナウンスに従い、Klocworkのjackサポートも限定的となります
https://android-developers.googleblog.com/2017/03/future-of-java-8-language-feature.html
26© 2017 Rogue Wave Software, Inc. All Rights Reserved. 26
リファレンス
• Klocwork 2017.1 release note
– https://support.roguewave.com/documentation/klocwork/jp/current/rel
easenotes/
• What's new
– https://support.roguewave.com/documentation/klocwork/jp/current/wh
atsnewmain/
• Fixed issues
– https://support.roguewave.com/documentation/klocwork/jp/current/fix
edissues/
27© 2017 Rogue Wave Software, Inc. All Rights Reserved. 27

Klocwork 2017.1アップデート

  • 1.
    1© 2017 RogueWave Software, Inc. All Rights Reserved. 1 Klocwork 2017.1
  • 2.
    2© 2017 RogueWave Software, Inc. All Rights Reserved. 2 Rogue Wave Klocwork 2017.1 のご紹介 Masaru Horioka Sales Engineering Manager, APAC Rogue Wave Software
  • 3.
    3© 2017 RogueWave Software, Inc. All Rights Reserved. 3 はじめに • Klocwork開発チームはアジャイル開発体制をとっており、1年に1回のメ ジャーバージョンアップ、および3ヶ月ごとのマイナーバージョンアップ ににより、新機能の追加、機能改善、バグフィクスを行っています。 • 新バージョンを利用するためには有効なサブスクリプション契約または保 守契約が必要です。 – メジャーバージョンアップの際にはライセンスファイルが変更され ます。 – 永久ライセンスをお持ちのお客様で、有効な保守契約をお持ちで無 い場合、新バージョン用のライセンスは発行されませんのでご注意 ください。
  • 4.
    4© 2017 RogueWave Software, Inc. All Rights Reserved. 4 重要な変更
  • 5.
    5© 2017 RogueWave Software, Inc. All Rights Reserved. 5 ライセンスサーバーの動作要件の変更 • Klocwork 2017 向けのライセンスが必要になります。ライセンスの入手は Klocwork担当 営業、または販売代理店にご連絡ください。 • Klocwork 2017向けライセンスはKlocwork 11.x 以前のライセンスサーバーでは動作しま せん。 – Klocwork 2017のライセンスサーバーまたは、FlexNet Publisher 2016 R1 (11.14.0.2) 以降のライセンスサーバーをご利用ください。 • Klocwork 2017.xにおいて, dongleライセンスが動作しない不具合が報告されています。 対応方法ついてはKlocwork supportまでご連絡ください。 (2017.2にて正式な修正が予定 されています。) – 注意:Dongleライセンスは Windows および Redhat Linux (Ubuntuは対象外)と なっております。 – https://support.roguewave.com/documentation/klocwork/jp/current/supportedplatfor ms/ • Linux上で追加パッケージのインストールが必要になります。 – 詳細は "Licensing requirements" をご確認ください。 https://support.roguewave.com/documentation/klocwork/jp/current/supportedplatfor ms/
  • 6.
    6© 2017 RogueWave Software, Inc. All Rights Reserved. 6 Klocwork 2017.1の新機能
  • 7.
    7© 2017 RogueWave Software, Inc. All Rights Reserved. 7 Klocwork 2017.1 (12.1) の新機能のま とめ • 新しいセキュリティレポート – 開発リーダー向けにプロジェクトに残存する代表的なセキュリティリスク を見える化 • 解析エンジンの改善 – 新しいJavaセキュリティチェッカー – MISRA C 2012のチェッカーの追加 – CERT-C/C++ 2016向け分類基準アップデート – C# 6.0フルサポート • 新しいプラットフォーム対応 – Visual Studio 2017 – コンパイラ/OSの追加サポート • その他 – "update_status" APIの利用制限解除 – Android Nプラットフォーム解析におけるJackコンパイラサポートの改善 (ただし特別なスクリプトをサポートから入手する必要あり)
  • 8.
    8© 2017 RogueWave Software, Inc. All Rights Reserved. 8 新しいセキュリティレポート
  • 9.
    9© 2017 RogueWave Software, Inc. All Rights Reserved. 9 新しいセキュリティレポート • 背景 – セキュリティの観点での静的解析実行の必要性の増加 – 開発早期段階からのセキュリティ問題を作り込まない開発プロセスが重 要 – 多くの開発チームがCWE, CERT, OWASP, DISA STIGのいずれかを採用 している • ゴール – 開発の早期段階からセキュリティリスクを見える化 – リスクの高い課題を抽出し、対応の優先順位付けを支援 • 提供する機能 – CWE Top 25, CERT-C, DISA-STIGの観点からセキュリティリスクを見え る化するビルトインレポートの提供 – 指摘数のトレンド、指摘の多い脆弱性パターン、指摘の多いソースコー ドディレクトリを表示
  • 10.
    10© 2017 RogueWave Software, Inc. All Rights Reserved. 10 新しいセキュリティレポート 開発リーダー向けにセキュリティリスクを見える化 プロジェクトに残存す る脆弱性パターントッ プ3の指摘数の推移 最新の解析で最も指摘 数の多い脆弱性トップ 3 指摘数が多いディレク トリ
  • 11.
    11© 2017 RogueWave Software, Inc. All Rights Reserved. 11 セキュリティレポートの作成(1) "新規レポートの作成"をクリックし"セキュリティ"を選択 前提条件: プロジェクトの”構成”タブからセキュリティ分類基準 (CWE, CERT, OWASP, または DISA-STIG) をインポート済みであること
  • 12.
    12© 2017 RogueWave Software, Inc. All Rights Reserved. 12 セキュリティレポートの作成(2) レポートの対象開発期間と使用するセキュリティ分類基準を選択 レポート作成対 象期間を選択 分類基準を選択
  • 13.
    13© 2017 RogueWave Software, Inc. All Rights Reserved. 13 詳細なレポートが必要な場合既存の"Category detail report(カテゴリ別詳細)" を参照
  • 14.
    14© 2017 RogueWave Software, Inc. All Rights Reserved. 14 ビデオ: Reporting with Klocwork(英 語) • https://www.klocwork.com/resources/videos/reporting-with-klocwork
  • 15.
    15© 2017 RogueWave Software, Inc. All Rights Reserved. 15 Klocwork 2017.1における 解析エンジンの改善
  • 16.
    16© 2017 RogueWave Software, Inc. All Rights Reserved. 16 解析エンジンの改善 − まとめ • 新しい Javaセキュリティチェッカー – OWASP TOP 10-A6/CWE-311: Missing Encryption of Sensitive Data. – OWASP TOP 10-A8/CWE-352: Cross-Site Request Forgery. • 新しい MISRA C 2012 チェッカー – Rule 4.1(Required): Octal and hexadecimal escape sequences shall be terminated – Rule 5.4(Required): Macro identifiers shall be distinct – Rule 17.6(Mandatory): The declaration of an array parameter shall not contain the static keyword between the [ ] – Rule 22.4(Mandatory): There shall be no attempt to write to a stream which has been opened as read-only. • CERT-C/C++ 2016向け分類基準のアップデート – 自動車業界での CERT-Cの採用ケースが増加 – デフォルトチェッカーでは91 rule/recommendation をサポート(カバー率 約3 0%) • カスタムチェッカーによりカバー率の向上は可能 • C# 6.0 フルサポート
  • 17.
    17© 2017 RogueWave Software, Inc. All Rights Reserved. 17 Javaチェッカー: OWASP Top 10-A6/CWE- 311: Missing Encryption of Sensitive Data Checker Description Default Severity Enabled by default? Tunable? SV.SENSITIVE .DATA 暗号化されて いない機密情 報の書き込み 2 true Yes SV.SENSITIVE .OBJ 暗号化されて いないオブ ジェクトデー タの保存 2 true Yes
  • 18.
    18© 2017 RogueWave Software, Inc. All Rights Reserved. 18 例: SV.SENSITIVE.DATA 変数名からセンシティブ データを推測 (カスタマ イズ可能) 暗号化しないまま ファイルへの書き 込みを検出暗号化に使用する 関数を jkbファイ ルで登録
  • 19.
    19© 2017 RogueWave Software, Inc. All Rights Reserved. 19 JKBファイル例 SensitiveDatatest.encrypt() の戻り値は暗号化済みであると登録 参照: https://support.roguewave.com/documentation/klocwork/jp/current/javaknowled gebasereference/#concept473
  • 20.
    20© 2017 RogueWave Software, Inc. All Rights Reserved. 20 Java チェッカー: OWASP TOP 10- A8/CWE-352: Cross-Site Request Forgery. Checker Description Default Severity Enabled by default? Tunable? SV.CSRF.GET GET リクエ スト中の CSRF トー クン 4 false Yes SV.CSRF.ORIGI N オリジン チェックな しの要求ハ ンドラ 4 false Yes SV.CSRF.TOKEN CSRF チェックな しの状態変 更要求ハン ドラ 4 false Yes
  • 21.
    21© 2017 RogueWave Software, Inc. All Rights Reserved. 21 例:SV.CSRF.ORIGIN リクエストヘッダにおいて"Origin" または "Referer" をチェックしてい るかどうか確認
  • 22.
    22© 2017 RogueWave Software, Inc. All Rights Reserved. 22 CERT-C/C++ 2016向け分類基準のアップ デート • CERT-C/C++ 2016向けマッピングの改善により50以上のルールを追加サ ポート • Klocwork マニュアルの更新 • https://support.roguewave.com/documentation/klocwork/jp/current/certcandcs ecurecodingstandardidsmappedtoklocworkcandccheckers/ • TCERT公式Webサイト内のKlocwork情報も合わせて更新 • https://www.securecoding.cert.org/confluence/display/c/Klocwork
  • 23.
    23© 2017 RogueWave Software, Inc. All Rights Reserved. 23 Klocwork 2017.1における 追加プラットフォームサポート その他の改善
  • 24.
    24© 2017 RogueWave Software, Inc. All Rights Reserved. 24 追加プラットフォームサポート その他の改善 • Visual Studio extension(vsixプラグイン)の改善 – Visual Studio 2017サポート – 安定性とパフォーマンスの改善 • コンパイラ・ビルド環境サポートの改善 – 新サポート: Microchip MPLAB XC8 C – 改善: GNU, Microsoft Visual C++, Synopsys ARC MetaWare – Gradle version 3.41までサポート対象 • Web API – "update_status" API の利用制約を撤廃 • APIの仕様例 https://support.roguewave.com/documentation/klocwork/jp/current/examples 2/#Example:Updateissuestatus • その他の重要な改善 – プロジェクトの "import"機能でデータ不整合が発生するバグを修正 – Android N Jack のサポート
  • 25.
    25© 2017 RogueWave Software, Inc. All Rights Reserved. 25 Android N におけるJackコンパイラを利 用したJava 解析の改善 • 問題 – Android Nプラットフォーム開発環境で、Jackコンパイラを使用している場合、解 析に必要なjarが生成されてない事が原因で、 kwbuildproject 実行時に、 "Unresolved import", "Unresolved method", and "Unresolved name" が発生し、解 析精度に問題がある。 • 回避策 – 必要なjarファイルを生成するための、特別なスクリプトを提供する。このスクリ プトはkwinjectの後、kwbuildprojectコマンド以前に実行する。詳細はKlocwork サ ポートチケットにて提供する。 注意: Google社は"jack" コンパイラの使用をdeprecated扱いにすることをアナウンスしてい ます。このアナウンスに従い、Klocworkのjackサポートも限定的となります https://android-developers.googleblog.com/2017/03/future-of-java-8-language-feature.html
  • 26.
    26© 2017 RogueWave Software, Inc. All Rights Reserved. 26 リファレンス • Klocwork 2017.1 release note – https://support.roguewave.com/documentation/klocwork/jp/current/rel easenotes/ • What's new – https://support.roguewave.com/documentation/klocwork/jp/current/wh atsnewmain/ • Fixed issues – https://support.roguewave.com/documentation/klocwork/jp/current/fix edissues/
  • 27.
    27© 2017 RogueWave Software, Inc. All Rights Reserved. 27