JP2014174577A - Verification device, verification method, and program - Google Patents

Verification device, verification method, and program Download PDF

Info

Publication number
JP2014174577A
JP2014174577A JP2013043547A JP2013043547A JP2014174577A JP 2014174577 A JP2014174577 A JP 2014174577A JP 2013043547 A JP2013043547 A JP 2013043547A JP 2013043547 A JP2013043547 A JP 2013043547A JP 2014174577 A JP2014174577 A JP 2014174577A
Authority
JP
Japan
Prior art keywords
node
candidate
nodes
data flow
source code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2013043547A
Other languages
Japanese (ja)
Other versions
JP5941859B2 (en
Inventor
Hiroaki Oguro
博昭 小黒
Takuya Hashimoto
卓哉 橋本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NTT Data Group Corp
Original Assignee
NTT Data Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NTT Data Corp filed Critical NTT Data Corp
Priority to JP2013043547A priority Critical patent/JP5941859B2/en
Publication of JP2014174577A publication Critical patent/JP2014174577A/en
Application granted granted Critical
Publication of JP5941859B2 publication Critical patent/JP5941859B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To appropriately dispose a sanitizer while reducing operation man-hours.SOLUTION: The verification device includes: a data flow analysis unit that extracts an input point node, an output point node, and a sanitization node to analyze a data flow of a source code, and generates a digraph representing a data flow including nodes from the input point node to the output point node; a first extraction unit that extracts, in the nodes included in the digraph, a taint node that is on a route not passing through the sanitization node, a downstream node that is disposed at a downstream side of the sanitization node, and an upstream node that is disposed in the upstream side of the sanitization node, on the basis of the digraph and the sanitization node; and a second extraction unit that extracts a candidate node representing a candidate of a node to which sanitization processing is allocated on the basis of the taint node, the downstream node, and the upstream node, and outputs information representing a position on the source code corresponding to the extracted candidate node, to an output unit.

Description

本発明は、検証装置、検証方法、及びプログラムに関する。   The present invention relates to a verification device, a verification method, and a program.

近年、セキュリティの脆弱性について、プログラムの開発段階(例えば、ソースコードの段階)において、静的な解析(静的解析)を行う技術が知られている(例えば、特許文献1を参照)。特許文献1に記載の技術では、ソースコードのデータフローを解析し、この解析結果に基づいてセキュリティの脆弱性を抽出している。   2. Description of the Related Art In recent years, a technology for performing static analysis (static analysis) at a program development stage (for example, a source code stage) is known for security vulnerabilities (see, for example, Patent Document 1). In the technique described in Patent Document 1, the data flow of the source code is analyzed, and security vulnerabilities are extracted based on the analysis result.

特開2008−502046号公報JP 2008-502046 A

ところで、上述のような静的解析を行う技術において、Webアプリケーションの脆弱性をソースコードレベルで検証する手法として、セキュリティに特化した静的解析ツールとしての検証装置が広く知られている。このような検証装置は、例えば、ソースコード上の外部入力点(Source:ソース)から、画面出力点やデータベースへの処理要求(クエリー)が送信される点などのセキュリティ上考慮されるべき出力点(Sink:シンク)に至るデータフローを解析する。そして、検証装置は、データフローにおける全ての経路において、出力点に応じたエスケープ処理(Sanitizer:サニタイザ)が適用されているか否かを検証し、ソースコード上の脆弱性の可能性がある箇所を出力する。このような解析手法は、汚染解析(Taint Analysis)と呼ばれている。   By the way, in the technique for performing the static analysis as described above, a verification apparatus as a static analysis tool specialized for security is widely known as a technique for verifying the vulnerability of a Web application at the source code level. Such a verification device is, for example, an output point that should be considered for security, such as a point where a screen output point or a processing request (query) to a database is transmitted from an external input point (Source) on the source code. Analyzes the data flow to (Sink). Then, the verification device verifies whether or not escape processing (Sanitizer) corresponding to the output point is applied to all the paths in the data flow, and identifies a place where there is a possibility of vulnerability in the source code. Output. Such an analysis method is called contamination analysis.

しかしながら、上述の検証装置では、汚染解析を実施した結果として脆弱性の可能性がある箇所が発見された場合に、サニタイザを適切に配置するように修正する作業は、人間が注意深く行う必要がある。上述の検証装置では、例えば、ソースコードの規模や複雑度によって、入力点から出力点までの経路が膨大に検出されることがあり、このような場合に、サニタイザを適切に配置するように修正する作業にかかる作業工数が膨大になるという問題があった。また、上述の検証装置では、例えば、人手によってサニタイザを配置する場合に、1つの経路に誤って二重にサニタイザを配置してしまうことがある。このような場合には、サニタイザが二重に挿入されて、エスケープ処理が二重に実行されるため、プログラムは、本来出力されるべきデータを正しく出力することができないことがある。このように、上述の検証装置では、1つの経路に誤って二重にサニタイザを配置してしまうことがあるという問題があった。   However, in the above-described verification apparatus, when a location that may be vulnerable is found as a result of the contamination analysis, it is necessary for humans to carefully perform the work of correcting the sanitizer so that it is properly arranged. . In the verification device described above, for example, the path from the input point to the output point may be detected enormously depending on the size and complexity of the source code. In such a case, the sanitizer is modified so that it is appropriately arranged. There is a problem that the number of work steps required for the work to be performed becomes enormous. In the above-described verification device, for example, when the sanitizer is manually arranged, the sanitizer may be mistakenly arranged in one path. In such a case, since the sanitizer is inserted twice and the escape process is executed twice, the program may not be able to correctly output the data that should be output. As described above, the above-described verification apparatus has a problem that a sanitizer may be mistakenly arranged in one path.

本発明は、上記問題を解決すべくなされたもので、その目的は、作業工数を低減しつつ、サニタイザを適切に配置することができる検証装置、検証方法、及びプログラムを提供することにある。   The present invention has been made to solve the above problems, and an object of the present invention is to provide a verification device, a verification method, and a program capable of appropriately arranging a sanitizer while reducing the number of work steps.

上記問題を解決するために、本発明の一態様は、ソースコードを記憶したソースコード記憶部から前記ソースコードを取得し、取得した前記ソースコードに含まれる、データを入力する入力点ノード、データを出力する出力点ノード、及びデータに含まれる脆弱性の原因となる特殊文字を無害化する処理に対応する無害化ノードを、前記入力点ノード、前記出力点ノード、及び前記無害化ノードのそれぞれに対応する記述を示す記述情報を記憶するルール情報記憶部から取得した前記記述情報に基づいて抽出して、前記ソースコードのデータフローを解析するとともに、前記入力点ノードから前記出力点ノードまでのノードを含む前記データフローを示す有向グラフを生成するデータフロー解析部と、前記ソースコードのデータフローを解析するとともに、前記入力点ノードから前記出力点ノードまでのノードを含む前記データフローを示す有向グラフを生成するデータフロー解析部と、前記データフロー解析部が生成した前記有向グラフと、前記無害化ノードとに基づいて、前記有向グラフに含まれる前記ノードのうちの、前記無害化ノードを通過しない経路上のノードである汚染ノードと、前記無害化ノードの下流に配置されたノードである下流ノードと、前記無害化ノードの上流に配置されたノードである上流ノードとを抽出する第1の抽出部と、前記第1の抽出部が抽出した前記汚染ノードと前記下流ノードと前記上流ノードとに基づいて、前記無害化する処理を配置するノードの候補を示す候補ノードを抽出し、抽出した前記候補ノードに対応する前記ソースコード上の位置を示す情報を出力部に出力させる第2の抽出部とを備えることを特徴とする検証装置である。   In order to solve the above problem, according to one aspect of the present invention, the source code is acquired from the source code storage unit that stores the source code, and the input point node that inputs the data included in the acquired source code, data Output point nodes, and detoxification nodes corresponding to processing for detoxifying special characters that cause vulnerabilities included in data, respectively, the input point node, the output point node, and the detoxification node Is extracted based on the description information acquired from the rule information storage unit that stores the description information indicating the description corresponding to, the data flow of the source code is analyzed, and from the input point node to the output point node A data flow analysis unit that generates a directed graph showing the data flow including nodes, and analyzes the data flow of the source code And a data flow analysis unit that generates a directed graph indicating the data flow including nodes from the input point node to the output point node, the directed graph generated by the data flow analysis unit, and the detoxification node. Based on the node included in the directed graph, a contaminated node that is a node on a path that does not pass through the detoxification node, a downstream node that is a node disposed downstream of the detoxification node, and the harmless Based on the first extraction unit that extracts an upstream node that is a node arranged upstream of the conversion node, the contaminated node, the downstream node, and the upstream node extracted by the first extraction unit, Extract a candidate node indicating a candidate of a node where a process to be rendered harmless is arranged, and on the source code corresponding to the extracted candidate node The verification device characterized by comprising a second extracting unit for outputting information indicating the location in the output section.

また、本発明の一態様は、上記の検証装置において、前記第2の抽出部は、前記汚染ノードの集合から、前記下流ノードの集合及び前記上流ノードの集合を除外した候補集合に含まれるノードを、前記候補ノードとして抽出することを特徴とする。   Further, according to one aspect of the present invention, in the verification device, the second extraction unit includes nodes that are included in a candidate set that excludes the set of downstream nodes and the set of upstream nodes from the set of contaminated nodes. Are extracted as the candidate nodes.

また、本発明の一態様は、上記の検証装置において、前記第2の抽出部は、抽出した前記候補ノードのうち、前記有向グラフ上の経路において前記出力点ノードに最も近いノードを、最優先順位の候補ノードとして抽出することを特徴とする。   Further, according to one aspect of the present invention, in the verification device, the second extraction unit selects a node closest to the output point node in the route on the directed graph among the extracted candidate nodes as a highest priority. It is characterized by extracting as a candidate node.

また、本発明の一態様は、上記の検証装置において、前記第2の抽出部は、抽出した前記候補ノードのうち、前記有向グラフ上の経路において分岐先となるノードに対して、前記候補ノードとしての優先順位を下げることを特徴とする。   In addition, according to one aspect of the present invention, in the verification device, the second extraction unit determines, as the candidate node, a node that is a branch destination in the route on the directed graph among the extracted candidate nodes. It is characterized by lowering the priority.

また、本発明の一態様は、上記の検証装置において、前記第2の抽出部は、抽出した前記候補ノードのうち、前記有向グラフ上の経路において分岐の収束先となるノードに対して、前記候補ノードとしての優先順位を上げることを特徴とする。   In addition, according to another aspect of the present invention, in the verification device, the second extraction unit is configured to select the candidate for a node that is a convergence destination of a branch on the route on the directed graph among the extracted candidate nodes. It is characterized by raising the priority as a node.

また、本発明の一態様は、上記の検証装置において、前記第2の抽出部は、前記有向グラフが複数の入力点ノード又は複数の出力点ノードを含む場合に、前記入力点ノードと前記出力点ノードとの組み合わせのそれぞれに対して、前記候補ノードを抽出することを特徴とする。   Further, according to one aspect of the present invention, in the verification device, the second extraction unit includes the input point node and the output point when the directed graph includes a plurality of input point nodes or a plurality of output point nodes. The candidate nodes are extracted for each combination with a node.

また、本発明の一態様は、上記の検証装置において、前記第2の抽出部は、前記組み合わせのそれぞれに対して抽出した前記候補ノードが重複する場合に、重複する前記候補ノードに対して、前記候補ノードとしての優先順位を上げることを特徴とする。   Further, according to one aspect of the present invention, in the verification apparatus, when the candidate nodes extracted for each of the combinations overlap, the second extraction unit performs The priority order as the candidate node is increased.

また、本発明の一態様は、データフロー解析部が、ソースコードを記憶したソースコード記憶部から前記ソースコードを取得し、取得した前記ソースコードに含まれる、データを入力する入力点ノード、データを出力する出力点ノード、及びデータに含まれる脆弱性の原因となる特殊文字を無害化する処理に対応する無害化ノードを、前記入力点ノード、前記出力点ノード、及び前記無害化ノードのそれぞれに対応する記述を示す記述情報を記憶するルール情報記憶部から取得した前記記述情報に基づいて抽出して、前記ソースコードのデータフローを解析するとともに、前記入力点ノードから前記出力点ノードまでのノードを含む前記データフローを示す有向グラフを生成するデータフロー解析ステップと、第1の抽出部が、前記データフロー解析ステップによって生成された前記有向グラフと、前記無害化ノードとに基づいて、前記有向グラフに含まれる前記ノードのうちの、前記無害化ノードを通過しない経路上のノードである汚染ノードと、前記無害化ノードの下流に配置されたノードである下流ノードと、前記無害化ノードの上流に配置されたノードである上流ノードとを抽出する第1の抽出ステップと、第2の抽出部が、前記第1の抽出ステップによって抽出された前記汚染ノードと前記下流ノードと前記上流ノードとに基づいて、前記無害化する処理を配置するノードの候補を示す候補ノードを抽出し、抽出した前記候補ノードに対応する前記ソースコード上の位置を示す情報を出力部に出力させる第2の抽出ステップと含むことを特徴とする検証方法である。   Further, according to one embodiment of the present invention, the data flow analysis unit acquires the source code from the source code storage unit that stores the source code, and includes an input point node that inputs data included in the acquired source code, data Output point nodes, and detoxification nodes corresponding to processing for detoxifying special characters that cause vulnerabilities included in data, respectively, the input point node, the output point node, and the detoxification node Is extracted based on the description information acquired from the rule information storage unit that stores the description information indicating the description corresponding to, the data flow of the source code is analyzed, and from the input point node to the output point node A data flow analyzing step for generating a directed graph indicating the data flow including nodes, and a first extraction unit comprising: -Based on the directed graph generated by the analysis step and the detoxification node, among the nodes included in the directed graph, a contaminated node that is a node on a path that does not pass through the detoxification node; A first extraction step of extracting a downstream node that is a node arranged downstream of the decontamination node and an upstream node that is a node arranged upstream of the detoxification node; and a second extraction unit, Based on the contaminated node, the downstream node, and the upstream node extracted by one extraction step, a candidate node indicating a candidate of a node where the processing to be rendered harmless is extracted, and corresponds to the extracted candidate node And a second extraction step of causing the output unit to output information indicating the position on the source code.

また、本発明の一態様は、検証装置としてのコンピュータに、データフロー解析部が、ソースコードを記憶したソースコード記憶部から前記ソースコードを取得し、取得した前記ソースコードに含まれる、データを入力する入力点ノード、データを出力する出力点ノード、及びデータに含まれる脆弱性の原因となる特殊文字を無害化する処理に対応する無害化ノードを、前記入力点ノード、前記出力点ノード、及び前記無害化ノードのそれぞれに対応する記述を示す記述情報を記憶するルール情報記憶部から取得した前記記述情報に基づいて抽出して、前記ソースコードのデータフローを解析するとともに、前記入力点ノードから前記出力点ノードまでのノードを含む前記データフローを示す有向グラフを生成するデータフロー解析ステップと、第1の抽出部が、前記データフロー解析ステップによって生成された前記有向グラフと、前記無害化ノードとに基づいて、前記有向グラフに含まれる前記ノードのうちの、前記無害化ノードを通過しない経路上のノードである汚染ノードと、前記無害化ノードの下流に配置されたノードである下流ノードと、前記無害化ノードの上流に配置されたノードである上流ノードとを抽出する第1の抽出ステップと、第2の抽出部が、前記第1の抽出ステップによって抽出された前記汚染ノードと前記下流ノードと前記上流ノードとに基づいて、前記無害化する処理を配置するノードの候補を示す候補ノードを抽出し、抽出した前記候補ノードに対応する前記ソースコード上の位置を示す情報を出力部に出力させる第2の抽出ステップとを実行させるためのプログラムである。   Further, according to one embodiment of the present invention, a data flow analysis unit acquires the source code from a source code storage unit that stores a source code, and stores data included in the acquired source code in a computer as a verification device. An input point node to input, an output point node to output data, and a detoxification node corresponding to a process for detoxifying special characters that cause a vulnerability included in data, the input point node, the output point node, And extracting based on the description information acquired from the rule information storage unit storing description information indicating the description corresponding to each of the detoxification nodes, analyzing the data flow of the source code, and the input point node Data flow analysis step for generating a directed graph indicating the data flow including nodes from the output point node to the output point node The first extraction unit is on a path that does not pass through the detoxification node among the nodes included in the directed graph based on the directed graph generated by the data flow analysis step and the detoxification node. A first extraction step of extracting a contaminated node, a downstream node that is a node disposed downstream of the detoxification node, and an upstream node that is a node disposed upstream of the detoxification node; The second extraction unit selects candidate nodes indicating candidate nodes for arranging the detoxifying process based on the contaminated node, the downstream node, and the upstream node extracted in the first extraction step. And performing a second extraction step of causing the output unit to output information indicating a position on the source code corresponding to the extracted candidate node. It is because of the program.

本発明によれば、作業工数を低減しつつ、サニタイザを適切に配置することができる。また、二重にサニタイザを配置することのない適切な候補ノードを抽出するので、二重にサニタイザが挿入されることを未然に回避することができる。   According to the present invention, the sanitizer can be appropriately arranged while reducing the work man-hours. In addition, since an appropriate candidate node that does not place a sanitizer in duplicate is extracted, it is possible to avoid double insertion of a sanitizer.

本発明に係る汚染解析の一例を示す模式図である。It is a schematic diagram which shows an example of the contamination analysis which concerns on this invention. 脆弱性の原因となる特殊文字とサニタイザによる無害化処理(エスペープ処理)の一例を示す図である。It is a figure which shows an example of the detoxification process (escape process) by the special character and sanitizer which cause a vulnerability. 第1の実施形態による検証装置の一例を示すブロック図である。It is a block diagram which shows an example of the verification apparatus by 1st Embodiment. 本実施形態におけるルール情報記憶部のデータ構成の一例を示す図である。It is a figure which shows an example of a data structure of the rule information storage part in this embodiment. 本実施形態におけるグラフ情報記憶部のデータ構成の一例を示す図である。It is a figure which shows an example of a data structure of the graph information storage part in this embodiment. 本実施形態における抽出情報記憶部のデータ構成の一例を示す図である。It is a figure which shows an example of a data structure of the extraction information storage part in this embodiment. 本実施形態における候補情報記憶部のデータ構成の一例を示す図である。It is a figure which shows an example of a data structure of the candidate information storage part in this embodiment. 本実施施形態における検証装置の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of the verification apparatus in this embodiment. 本実施形態におけるデータフロー解析の一例を示す模式図である。It is a schematic diagram which shows an example of the data flow analysis in this embodiment. 本実施形態における有向グラフの一例を示す模式図である。It is a schematic diagram which shows an example of the directed graph in this embodiment. 本実施形態における有向グラフを示すリスト情報の一例を示す模式図である。It is a schematic diagram which shows an example of the list information which shows the directed graph in this embodiment. 本実施形態におけるデータフロー解析結果の一例を示す図である。It is a figure which shows an example of the data flow analysis result in this embodiment. 第1の実施形態におけるサニタイザの候補抽出処理の一例を示すフローチャートである。It is a flowchart which shows an example of the sanitizer candidate extraction process in 1st Embodiment. 本実施形態におけるサニタイザの候補抽出処理の手順(下流ノードの抽出)の一例を説明する第1の図である。It is a 1st figure explaining an example of the procedure (extraction of a downstream node) of the candidate extraction process of the sanitizer in this embodiment. 本実施形態におけるサニタイザの候補抽出処理の手順(上流ノードの抽出)の一例を説明する第2の図である。It is a 2nd figure explaining an example of the procedure (extraction of an upstream node) of the candidate extraction process of the sanitizer in this embodiment. 本実施形態におけるサニタイザの候補抽出処理の手順(汚染ノードの抽出)の一例を説明する第3の図である。It is a 3rd figure explaining an example of the procedure (extraction of a contamination node) of the sanitizer candidate extraction process in this embodiment. 本実施形態におけるサニタイザの候補抽出処理の手順(候補ノードの抽出)の一例を説明する第4の図である。It is a 4th figure explaining an example of the procedure (extraction of a candidate node) of the candidate extraction process of the sanitizer in this embodiment. 本実施形態における検証装置の効果を説明する図である。It is a figure explaining the effect of the verification apparatus in this embodiment. 従来の汚染解析によるサニタイザの二重挿入の一例を示す図である。It is a figure which shows an example of the double insertion of the sanitizer by the conventional pollution analysis. 第2の実施形態におけるサニタイザの候補抽出処理の一例を説明する図である。It is a figure explaining an example of the sanitizer candidate extraction process in 2nd Embodiment. 第2の実施形態におけるサニタイザの候補抽出処理の一例を示すフローチャートである。It is a flowchart which shows an example of the candidate extraction process of the sanitizer in 2nd Embodiment. 第3の実施形態におけるサニタイザの候補抽出処理の一例を説明する図である。It is a figure explaining an example of the sanitizer candidate extraction process in 3rd Embodiment. 第3の実施形態におけるサニタイザの候補抽出処理の一例を示すフローチャートである。It is a flowchart which shows an example of the sanitizer candidate extraction process in 3rd Embodiment.

まず、本発明の実施形態を説明する前に、本明細書で使用する用語を以下、定義する。
「静的解析」とは、プログラムを動作させずに、ソースコードに対して行う解析のことであり、後述する「データフロー解析」も「静的解析」の1つである。
「データフロー解析」とは、プログラム内のあるデータ(変数、オブジェクト、等)に着目した際の、そのデータに関する処理の流れを追跡する解析のことである。
First, before describing embodiments of the present invention, terms used in this specification are defined below.
“Static analysis” refers to analysis performed on source code without operating a program, and “data flow analysis” described later is one of “static analysis”.
“Data flow analysis” is an analysis for tracking the flow of processing related to data when attention is given to certain data (variables, objects, etc.) in the program.

「汚染解析(Taint Analysis)」とは、データフロー解析の一種であり、ソース(Source)とシンク(Sink)との間のデータフローを解析する解析手法である。「汚染解析」では、ソースはすべて汚染されていると考え、データフローの経路(パス)の途中でサニタイザ(Sanitizer)を通れば無害化されると考える。この考えから、「汚染解析」では、ソースからシンクまでの可能な全ての経路において、無害化されたデータがシンクに到達する場合に、「安全」と判定され、可能な全ての経路のうちの1つでもサニタイザを通過しない経路がある場合に、「危険」と判定される。   “Taint analysis” is a kind of data flow analysis, and is an analysis method for analyzing a data flow between a source and a sink. In the “contamination analysis”, all sources are considered to be contaminated, and if they pass the sanitizer in the middle of the data flow path, they are considered to be harmless. Based on this idea, in the “contamination analysis”, it is determined that “safe” is performed when detoxified data reaches the sink in all possible paths from the source to the sink. If there is any route that does not pass through the sanitizer, it is determined as “dangerous”.

例えば、図1に示す有向グラフは、汚染解析の一例を示している。
図1において、データフローグラフ(有向グラフG1)は、ソースノードsc1(「Source1」)とシンクノードsk1(「Sink1」)との間のデータフローを示す有向グラフである。このデータフローグラフ(有向グラフG1)は、ノードn01〜n30を含んでおり、このノードn01〜n30のうちの、ノードn05、ノードn06、ノードn16、及びノードn30がサニタイザに対応するノード(無害化ノード)である。なお、ここで各「ノード」は、ソースコードにおけるデータに関する処理に対応している。また、上述のデータフローグラフ(有向グラフG1)に含まれる「ノード」には、ソースノードsc1、シンクノードsk1、及び無害化ノードも含まれる。
For example, the directed graph shown in FIG. 1 shows an example of contamination analysis.
In FIG. 1, a data flow graph (directed graph G1) is a directed graph showing a data flow between a source node sc1 (“Source1”) and a sink node sk1 (“Sink1”). This data flow graph (directed graph G1) includes nodes n01 to n30, and among these nodes n01 to n30, nodes n05, n06, node n16, and nodes n30 corresponding to the sanitizer (detoxification nodes). ). Here, each “node” corresponds to processing related to data in the source code. The “node” included in the data flow graph (directed graph G1) includes a source node sc1, a sink node sk1, and a detoxification node.

図1に示す例では、サニタイザを通過しない経路があり、ノードn12〜n14は、サニタイザを通過しないデータを処理する可能性があるため、シンクノードsk1は、「危険」と判定される。   In the example illustrated in FIG. 1, there is a path that does not pass through the sanitizer, and the nodes n12 to n14 may process data that does not pass through the sanitizer. Therefore, the sink node sk1 is determined to be “dangerous”.

「ソース(Source)」とは、外部から入力されるデータがプログラムに取り込まれる処理、又はその処理が記述されたプログラム上の位置を示している。なお、「ソース(Source)」に対応するソースコードの位置は、以下の説明において、「ソースノード」(入力点ノード)と呼ぶことがある。   “Source” indicates a process in which data input from the outside is taken into the program, or a position on the program where the process is described. The position of the source code corresponding to “Source” may be referred to as “Source Node” (input point node) in the following description.

「シンク(Sink)」とは、ユーザの入力がプログラム内部で加工され、画面又はデータベースへ出力される処理又はその処理が記述されたプログラム上の位置を示している。具体的に、「シンク(Sink)」とは、もし、そこで危険な文字列が出力された場合に意図しないセキュリティ侵害が発生する可能性がある処理、又はその処理が記述されたプログラム上の位置である。なお、「シンク(Sink)」に対応するソースコードの位置は、以下の説明において、「シンクノード」(出力点ノード)と呼ぶことがある。   “Sink” indicates a process in which a user input is processed in a program and output to a screen or a database, or a position on the program in which the process is described. Specifically, a “sink” is a process that may cause an unintended security breach when a dangerous character string is output, or a position on the program where the process is described. It is. Note that the position of the source code corresponding to “Sink” may be referred to as “sink node” (output point node) in the following description.

「サニタイザ(Sanitizer)」とは、ユーザの入力に含まれる文字のうち、そのままシンクに出力すると脆弱性が発現してしまう可能性がある特定の文字をエスケープする処理を示している。具体的に、「サニタイザ(Sanitizer)」とは、シンクに渡される可能性があるデータが、シンクで出力された後に意図しないセキュリティ侵害を発生させないように、シンクの出力先で特殊な意味を持つ文字列(特殊文字)を、それをエスケープした文字列に変換する関数(又はメソッド)、又はそれが記述されたプログラム上の位置を示している。つまり、「サニタイザ(Sanitizer)」とは、データに含まれる脆弱性の原因となる特殊文字を無害化する処理である。なお、「サニタイザ(Sanitizer)」に対応するソースコードの位置は、以下の説明において、「サニタイザノード」(無害化ノード)と呼ぶことがある。   “Sanitizer” indicates a process of escaping a specific character that may cause a vulnerability if it is output to a sink as it is among characters included in the user's input. Specifically, “Sanitizer” has a special meaning at the output destination of the sink so that data that may be passed to the sink does not cause an unintended security breach after it is output at the sink. A function (or method) for converting a character string (special character) into an escaped character string, or a position on the program where it is described. In other words, “Sanitizer” is a process of detoxifying special characters that cause vulnerability in data. Note that the location of the source code corresponding to “Sanitizer” may be referred to as “sanitizer node” (detoxification node) in the following description.

なお、「サニタイザ」は、図2に示すように、シンクの種類によって、異なる処理となる。
図2は、脆弱性の原因となる特殊文字とサニタイザによる無害化処理(エスケープ処理)の一例を示す図である。
この図において、表の縦列の項目は、順に(a)「出力先」、(b)「エスケープ処理名」、(c)「対象脆弱性」、(d)「エスケープ対象文字」、(e)「エスケープ結果」、及び(f)「二重エスケープ結果」を示している。ここで、(a)「出力先」は、シンクの種類を示し、(c)「対象脆弱性」は脆弱性の種類を示している。また、(d)「エスケープ対象文字」は、脆弱性の原因となる特殊文字を示し、(e)「エスケープ結果」は、サニタイザの処理を実行した場合の結果(無害化した結果)を示している。
また、この図において、表は、(a)「出力先」として、「HTML」(Hyper Text Markup Language)、「Javascript(登録商標)」(ジャバスクリプト)、及び「SQL文」(エスキューエル文)の3つの種類について示している。
また、
As shown in FIG. 2, the “sanitizer” performs different processing depending on the type of sink.
FIG. 2 is a diagram illustrating an example of a harmless process (escape process) using special characters and sanitizers that cause vulnerability.
In this figure, the items in the column of the table are (a) “output destination”, (b) “escape processing name”, (c) “target vulnerability”, (d) “escape target character”, (e) “Escape result” and (f) “Double escape result” are shown. Here, (a) “output destination” indicates the type of sink, and (c) “target vulnerability” indicates the type of vulnerability. In addition, (d) “escape target character” indicates a special character that causes a vulnerability, and (e) “escape result” indicates a result when sanitizer processing is executed (detoxified result). Yes.
Also, in this figure, the table shows (a) “HTML” (Hyper Text Markup Language), “Javascript (registered trademark)” (Javascript), and “SQL sentence” (Escuel sentence) as “output destination”. These three types are shown.
Also,

図2に示す例では、「HTML」に対応する(b)「エスケープ処理名」が「HTMLエスケープ」であり、(c)「対象脆弱性」が「クロスサイトスクリプティング」である。また、「HTML」に対応する(d)「エスケープ対象文字」(特殊文字)は、「&」、「<」、「<」、「”」、及び「’」であり、それぞれの特殊文字に対して、サニタイザの処理を実行した結果の文字列が、順に「&amp;」、「&lt;」、「&gt;」、「&quot;」、及び「&#39;」であることを示している。例えば、「HTML」に対応するサニタイザの処理は、「&」という文字がデータに含まれる場合に「&amp;」という文字列に変換する処理である。   In the example shown in FIG. 2, (b) “escape processing name” corresponding to “HTML” is “HTML escape”, and (c) “target vulnerability” is “cross-site scripting”. Also, (d) “escape target characters” (special characters) corresponding to “HTML” are “&”, “<”, “<”, “” ”, and“ ′ ”. On the other hand, the character string as a result of executing the sanitizer processing indicates “&amp;”, “&lt;”, “&gt;”, “&quot;”, and “&#39;” in order. . For example, the sanitizer process corresponding to “HTML” is a process of converting the character string “&” into a character string “&amp;” when the character “&” is included in the data.

また、「Javascript」に対応する(b)「エスケープ処理名」が「Javascriptエスケープ」であり、(c)「対象脆弱性」が「クロスサイトスクリプティング」である。また、「Javascript」に対応する(d)「エスケープ対象文字」(特殊文字)は、「’」、「”」、「¥」、「0x0d」、「0x0a」、「/」、「>」、及び「<」であり、それぞれの特殊文字に対して、サニタイザの処理を実行した結果の文字列が、順に「¥’」、「¥”」、「¥¥」、「¥r」、「¥n」、「¥/」、「¥x3e」、及び「¥x3c」であることを示している。例えば、「Javascript」に対応するサニタイザの処理は、「’」という文字がデータに含まれる場合に「¥’」という文字列に変換する処理である。
また、「SQL文」に対応する(b)「エスケープ処理名」が「SQLエスケープ」であり、(c)「対象脆弱性」が「SQLインジェクション」である。また、「SQL文」に対応する(d)「エスケープ対象文字」(特殊文字)は、「’」であり、この特殊文字に対して、サニタイザの処理を実行した結果の文字列が、「’’」であることを示している。
In addition, (b) “escape processing name” corresponding to “Javascript” is “Javascript escape”, and (c) “target vulnerability” is “cross-site scripting”. Also, (d) “escape target characters” (special characters) corresponding to “Javascript” are “′”, “” ”,“ ¥ ”,“ 0x0d ”,“ 0x0a ”,“ / ”,“> ”, And “<”, and the character string resulting from the sanitizer processing for each special character is “\ ′”, “¥” ”,“ ¥¥ ”,“ ¥ r ”,“ ¥ ”in order. n ”,“ ¥ / ”,“ ¥ x3e ”, and“ ¥ x3c ”. For example, the sanitizer process corresponding to “Javascript” is a process of converting a character string “¥” into a character string “¥” when the character “′” is included in the data.
Further, (b) “escape processing name” corresponding to “SQL sentence” is “SQL escape”, and (c) “target vulnerability” is “SQL injection”. In addition, (d) “escape target character” (special character) corresponding to “SQL sentence” is “′”, and the character string obtained as a result of executing the sanitizer process for this special character is “′”. "".

このような定義を前提に、以下、本発明の一実施形態による検証装置1について、図面を参照して説明する。
[第1の実施形態]
図3は、第1の実施形態による検証装置1の一例を示すブロック図である。
図3において、検証装置1は、入力部10、ソースコード記憶部20、検証記憶部30、表示部40、及び制御部50を備えている。
本実施形態における検証装置1は、データフロー解析により、データフローの全経路のうちの、サニタイザが挿入されていない経路を抽出するとともに、ソースコード上にサニタイザを挿入する候補位置(ソースコードのファイル名及び行番号)を出力する。
Based on such definitions, a verification apparatus 1 according to an embodiment of the present invention will be described below with reference to the drawings.
[First Embodiment]
FIG. 3 is a block diagram illustrating an example of the verification apparatus 1 according to the first embodiment.
In FIG. 3, the verification apparatus 1 includes an input unit 10, a source code storage unit 20, a verification storage unit 30, a display unit 40, and a control unit 50.
The verification apparatus 1 according to the present embodiment extracts a path in which a sanitizer is not inserted from all paths in the data flow by data flow analysis, and a candidate position (source code file) to insert the sanitizer on the source code. Name and line number).

入力部10は、例えば、キーボードなどの入力装置であり、ユーザの操作に基づいて、検証装置1を操作する各種情報が入力される。入力部10は、ユーザによって入力された情報を制御部50に出力する。   The input unit 10 is, for example, an input device such as a keyboard, and various information for operating the verification device 1 is input based on a user operation. The input unit 10 outputs information input by the user to the control unit 50.

ソースコード記憶部20は、検証対象となるソースコードを記憶する。ここで、ソースコードは、プログラムを記述したファイルであり、ソースコードは、複数のファイルに分割されて、ソースコード記憶部20に記憶されていてもよい。   The source code storage unit 20 stores a source code to be verified. Here, the source code is a file describing a program, and the source code may be divided into a plurality of files and stored in the source code storage unit 20.

検証記憶部30は、検証装置1がプログラムの脆弱性を検証するための各種情報を記憶する。検証記憶部30は、ルール情報記憶部31、グラフ情報記憶部32、抽出情報記憶部33、及び候補情報記憶部34を備えている。   The verification storage unit 30 stores various information for the verification device 1 to verify the vulnerability of the program. The verification storage unit 30 includes a rule information storage unit 31, a graph information storage unit 32, an extraction information storage unit 33, and a candidate information storage unit 34.

ルール情報記憶部31は、脆弱性を検証するための診断ルール情報を記憶する。ルール情報記憶部31は、例えば、図4に示すように、「ソース情報」、「シンク情報」、及び「サニタイザ情報」を予め記憶している。   The rule information storage unit 31 stores diagnostic rule information for verifying vulnerability. For example, as illustrated in FIG. 4, the rule information storage unit 31 stores “source information”, “sink information”, and “sanitizer information” in advance.

図4は、本実施形態におけるルール情報記憶部31のデータ構成の一例を示す図である。
図4に示す例では、「ソース情報」(ソース記述情報)とは、ソースに対応する処理(関数、又はメソッド)の記述情報であり、例えば、“getParameter()”などの記述である。
また、「シンク情報」(シンク記述情報)とは、シンクに対応する処理(関数、又はメソッド)の記述情報であり、例えば、“getWriter()”、“getOutputStream()”などの記述である。
また、「サニタイザ情報」(無害化記述情報)とは、サニタイザに対応する処理(関数、又はメソッド)の記述情報であり、例えば、“sanitizeString()”などの記述である。
FIG. 4 is a diagram illustrating an example of a data configuration of the rule information storage unit 31 in the present embodiment.
In the example illustrated in FIG. 4, “source information” (source description information) is description information of a process (function or method) corresponding to the source, for example, “getParameter ()”.
Further, “sink information” (sink description information) is description information of a process (function or method) corresponding to a sink, for example, “getWriter ()”, “getOutputStream ()”, and the like.
“Sanitizer information” (detoxification description information) is description information of a process (function or method) corresponding to the sanitizer, for example, “sanitizeString ()”.

図3に戻り、グラフ情報記憶部32は、制御部50がデータフロー解析により生成したデータフローグラフ(有向グラフ)を記憶する。グラフ情報記憶部32は、例えば、図5に示すように、「ソースノード情報」と「シンクノード情報」と「有向グラフ情報」とを関連付けて記憶している。   Returning to FIG. 3, the graph information storage unit 32 stores a data flow graph (directed graph) generated by the control unit 50 through data flow analysis. For example, as illustrated in FIG. 5, the graph information storage unit 32 stores “source node information”, “sink node information”, and “directed graph information” in association with each other.

図5は、本実施形態におけるグラフ情報記憶部32のデータ構成の一例を示す図である。
この図において、「ソースノード情報」は、ソースノードを識別する情報を示している。また、「シンクノード情報」は、シンクノードを識別する情報を示している。また、「有向グラフ情報」は、データフローグラフである有向グラフをデータのリストとして表現する情報を示している。なお、「有向グラフ情報」は、エッジの接続元のノードと接続先のノードとを関連付けた情報を複数含んだリストにより有向グラフを表現している。この「有向グラフ情報」の詳細については、後述する。
FIG. 5 is a diagram illustrating an example of a data configuration of the graph information storage unit 32 in the present embodiment.
In this figure, “source node information” indicates information for identifying the source node. The “sink node information” indicates information for identifying a sink node. “Directed graph information” indicates information that represents a directed graph, which is a data flow graph, as a list of data. The “directed graph information” expresses the directed graph by a list including a plurality of pieces of information in which the edge connection source node and the connection destination node are associated with each other. Details of the “directed graph information” will be described later.

再び、図3に戻り、抽出情報記憶部33は、サニタイザの候補であるサニタイザノードを抽出するための処理に用いる各種情報を記憶する。抽出情報記憶部33は、例えば、図6に示すように、「ソースノード情報」と、「シンクノード情報」と、「抽出情報」とを関連付けて記憶する。   Returning to FIG. 3 again, the extraction information storage unit 33 stores various types of information used for processing to extract sanitizer nodes that are sanitizer candidates. For example, as illustrated in FIG. 6, the extraction information storage unit 33 stores “source node information”, “sink node information”, and “extraction information” in association with each other.

図6は、本実施形態における抽出情報記憶部33のデータ構成の一例を示す図である。
この図において、「ソースノード情報」は、ソースノードを識別する情報を示している。また、「シンクノード情報」は、シンクノードを識別する情報を示している。また、「抽出情報」は、「サニタイザノード情報」と、「汚染ノード情報」と、「上流ノード情報」と、「下流ノード情報」とを含んでいる。すなわち、抽出情報記憶部33は、「抽出情報」として、「サニタイザノード情報」と、「汚染ノード情報」と、「上流ノード情報」とを関連付けて記憶する。
ここで、「サニタイザノード情報」は、サニタイザに対応するノードを示す情報であり、「汚染ノード情報」は、ソースノードとシンクノードとの間の複数の経路のうちの、サニタイザノードを通過しない経路に含まれるノードを示す情報である。また、「上流ノード情報」は、ソースノードとシンクノードとの間のノードのうち、サニタイザノードの上流に位置するノードを示す情報であり、「下流ノード情報」は、ソースノードとシンクノードとの間のノードのうち、サニタイザノードの下流に位置するノードを示す情報である。
FIG. 6 is a diagram illustrating an example of a data configuration of the extraction information storage unit 33 in the present embodiment.
In this figure, “source node information” indicates information for identifying the source node. The “sink node information” indicates information for identifying a sink node. The “extraction information” includes “sanitizer node information”, “contaminated node information”, “upstream node information”, and “downstream node information”. That is, the extraction information storage unit 33 stores “sanitizer node information”, “contaminated node information”, and “upstream node information” as “extraction information” in association with each other.
Here, “sanitizer node information” is information indicating a node corresponding to the sanitizer, and “contaminated node information” passes through the sanitizer node among a plurality of paths between the source node and the sink node. This is information indicating a node included in a route not to be transmitted. The “upstream node information” is information indicating a node located upstream of the sanitizer node among the nodes between the source node and the sink node, and the “downstream node information” is information on the source node and the sink node. Information indicating a node located downstream of the sanitizer node among the nodes between.

図6に示す例では、例えば、「ソースノード情報」が“Source1(sc1)”であり、「シンクノード情報」が“Sink1(sk1)”である場合に対応する「サニタイザノード情報」が“n05、n06、n16、n30、・・・”であり、「汚染ノード情報」が“n01、n02、n03、n08、・・・”であることを示している。また、この場合に、「上流ノード情報」が“n01、n02、n03、n04、・・・”であり、「下流ノード情報」が“n07、n12、n13、n14”であることを示している。   In the example illustrated in FIG. 6, for example, the “source node information” is “Source1 (sc1)” and the “sink node information” is “Sink1 (sk1)”. n05, n06, n16, n30,..., and “contaminated node information” indicates “n01, n02, n03, n08,. In this case, “upstream node information” is “n01, n02, n03, n04,...” And “downstream node information” is “n07, n12, n13, n14”. .

再び、図3に戻り、候補情報記憶部34は、制御部50が抽出したサニタイザを挿入する候補ノードを示す情報を記憶する。候補情報記憶部34は、例えば、図7に示すように、「ソースノード情報」と、「シンクノード情報」と、「候補ノード情報」とを関連付けて記憶する。   Returning to FIG. 3 again, the candidate information storage unit 34 stores information indicating candidate nodes into which the sanitizer extracted by the control unit 50 is inserted. For example, as illustrated in FIG. 7, the candidate information storage unit 34 stores “source node information”, “sink node information”, and “candidate node information” in association with each other.

図7は、本実施形態における候補情報記憶部34のデータ構成の一例を示す図である。
この図において、「ソースノード情報」は、ソースノードを識別する情報を示している。また、「シンクノード情報」は、シンクノードを識別する情報を示している。また、「候補ノード情報」は、サニタイザを挿入する候補ノードを示す情報である。
図7に示す例では、例えば、「ソースノード情報」が“Source1(sc1)”であり、「シンクノード情報」が“Sink1(sk1)”である場合に対応する「候補ノード情報」が“n08、n09、n10、n11”であることを示している。
FIG. 7 is a diagram illustrating an example of a data configuration of the candidate information storage unit 34 in the present embodiment.
In this figure, “source node information” indicates information for identifying the source node. The “sink node information” indicates information for identifying a sink node. The “candidate node information” is information indicating candidate nodes into which the sanitizer is inserted.
In the example illustrated in FIG. 7, for example, the “candidate node information” corresponding to the case where the “source node information” is “Source1 (sc1)” and the “sink node information” is “Sink1 (sk1)” is “n08”. , N09, n10, and n11 ″.

再び、図3に戻り、表示部40は、例えば、表示ディスプレイなどの表示装置であり、制御部50が解析した結果、及びサニタイザを挿入する候補の位置などの情報を表示する。   Returning to FIG. 3 again, the display unit 40 is a display device such as a display, for example, and displays information such as a result of analysis by the control unit 50 and a candidate position to insert a sanitizer.

制御部50は、例えば、CPU(Central Processing Unit)などを含むプロセッサであり、検証装置1を統括的に制御する。検証装置1は、例えば、ソースコード記憶部20に記憶されているソースコードに基づいて、データフロー解析を実行し、解析したデータフローの全経路のうちの、サニタイザが挿入されていない経路を抽出するとともに、ソースコード上にサニタイザを挿入する候補位置(ソースコードのファイル名及び行数位置)を出力する。
また、制御部50は、データフロー解析部51、ノード抽出部60、候補抽出部55、及び結果出力部56を備えている。
The control unit 50 is, for example, a processor including a CPU (Central Processing Unit) and the like, and comprehensively controls the verification device 1. For example, the verification apparatus 1 performs data flow analysis based on the source code stored in the source code storage unit 20 and extracts a path in which the sanitizer is not inserted from all paths of the analyzed data flow. At the same time, a candidate position (source code file name and line number position) for inserting the sanitizer on the source code is output.
The control unit 50 includes a data flow analysis unit 51, a node extraction unit 60, a candidate extraction unit 55, and a result output unit 56.

データフロー解析部51は、ソースコードのデータフローを解析し、ソースノードから、シンクノードまでのデータフローに対応する有向グラフを生成する。具体的に、データフロー解析部51は、ソースコード記憶部20に記憶されているソースコード(ソースコードファイル)を読み込み、ソースノード、シンクノード、及びサニタイザノードを抽出する。なお、データフロー解析部51は、ソースノードを抽出する際に、ルール情報記憶部31か記憶するソース記述情報(図4の「ソース情報」参照)に基づいて、ソースコード上のソースノードを判定する。また、データフロー解析部51は、シンクノードを抽出する際に、シンク記述情報(図4の「シンク情報」参照)に基づいて、ソースコード上のシンクノードを判定する。また、データフロー解析部51は、サニタイザノードを抽出する際に、無害化記述情報(図4の「サニタイザ情報」参照)に基づいて、ソースコード上のサニタイザノードを判定する。   The data flow analysis unit 51 analyzes the data flow of the source code and generates a directed graph corresponding to the data flow from the source node to the sink node. Specifically, the data flow analysis unit 51 reads a source code (source code file) stored in the source code storage unit 20 and extracts a source node, a sink node, and a sanitizer node. The data flow analysis unit 51 determines the source node on the source code based on the source description information stored in the rule information storage unit 31 (see “source information” in FIG. 4) when extracting the source node. To do. Further, when extracting the sync node, the data flow analyzing unit 51 determines the sync node on the source code based on the sync description information (see “sink information” in FIG. 4). Further, when extracting the sanitizer node, the data flow analysis unit 51 determines the sanitizer node on the source code based on the detoxification description information (see “sanitizer information” in FIG. 4).

データフロー解析部51は、図6に示すように、抽出したサニタイザノードの「サニタイザノード情報」を、「ソースノード情報」及び「シンクノード情報」に関連付けて抽出情報記憶部33に記憶させる。なお、ここでの「サニタイザノード情報」は、対応する「ソースノード情報」の示すソースノードと、「シンクノード情報」が示すノードとの間の経路に配置されているサニタイザノードを示している。   As shown in FIG. 6, the data flow analysis unit 51 stores the “sanitizer node information” of the extracted sanitizer node in the extraction information storage unit 33 in association with “source node information” and “sink node information”. . Here, “sanitizer node information” indicates a sanitizer node arranged in the path between the source node indicated by the corresponding “source node information” and the node indicated by “sink node information”. Yes.

また、データフロー解析部51は、読み込んだソースコードと、抽出したソースノード、シンクノード、及びサニタイザノードとに基づいて、データに関する処理の流れを追跡し、ソースコードのデータフローが有する経路のうちのサニタイザを通過しない経路(危険経路)を解析する(データフロー解析を行う)。また、データフロー解析部51は、解析したソースノードからシンクノードまでのノードを含むデータフローに対応するデータフローグラフ(有向グラフ)を生成し、生成したデータフローグラフをグラフ情報記憶部32に記憶させる。例えば、データフロー解析部51は、図5に示すように、「ソースノード情報」と、「シンクノード情報」と、生成したデータフローグラフの「有向グラフ情報」とを関連付けて記憶する。
データフロー解析部51によるデータフロー解析処理、及び有向グラフの生成処理の詳細については、後述する。
In addition, the data flow analysis unit 51 tracks the flow of processing related to data based on the read source code and the extracted source node, sink node, and sanitizer node, and the path of the path that the data flow of the source code has Analyze the route (dangerous route) that does not pass through our sanitizer (perform data flow analysis). Further, the data flow analysis unit 51 generates a data flow graph (directed graph) corresponding to the data flow including the analyzed nodes from the source node to the sink node, and stores the generated data flow graph in the graph information storage unit 32. . For example, as illustrated in FIG. 5, the data flow analysis unit 51 stores “source node information”, “sink node information”, and “directed graph information” of the generated data flow graph in association with each other.
Details of data flow analysis processing and directed graph generation processing by the data flow analysis unit 51 will be described later.

ノード抽出部60(第1の抽出部)は、グラフ情報記憶部32が記憶する有向グラフと、データフロー解析部51が抽出したサニタイザノードとに基づいて、有向グラフに含まれるノードのうちの、汚染ノードと、下流ノードと、上流ノードとを抽出する。ここで、汚染ノードとは、有向グラフに含まれるノードのうちの、サニタイザノードを通過しない経路上のノードのことである。また、下流ノードとは、有向グラフに含まれるノードのうちの、無害化ノードの下流に配置されたノードのことである。また、上流ノードとは、有向グラフに含まれるノードのうちの、無害化ノードの上流に配置されたノードのことである。
ノード抽出部60は、図6に示すように、抽出した汚染ノードと下流ノードと上流ノードとを関連付けて、抽出情報記憶部33に記憶させる。
また、ノード抽出部60は、汚染ノード抽出部52、下流ノード抽出部53、及び上流ノード抽出部54を備えている。
Based on the directed graph stored in the graph information storage unit 32 and the sanitizer node extracted by the data flow analysis unit 51, the node extraction unit 60 (first extraction unit) is a contamination of the nodes included in the directed graph. Nodes, downstream nodes, and upstream nodes are extracted. Here, the contaminated node is a node on a path that does not pass through the sanitizer node among the nodes included in the directed graph. The downstream node is a node arranged downstream of the detoxification node among the nodes included in the directed graph. Further, the upstream node is a node arranged upstream of the harmless node among the nodes included in the directed graph.
As illustrated in FIG. 6, the node extraction unit 60 associates the extracted contaminated node, the downstream node, and the upstream node with each other and stores them in the extraction information storage unit 33.
The node extraction unit 60 includes a contaminated node extraction unit 52, a downstream node extraction unit 53, and an upstream node extraction unit 54.

汚染ノード抽出部52は、グラフ情報記憶部32から取得した有向グラフと、抽出情報記憶部33から取得したサニタイザノードとに基づいて、有向グラフに含まれるノードのうちの、汚染ノードを抽出する。具体的に、汚染ノード抽出部52は、有向グラフに含まれるデータフローの全経路のうちから、サニタイザノードを通過する経路を除外し、残った経路を危険経路(汚染経路)として抽出する。そして、汚染ノード抽出部52は、抽出した危険経路に含まれるノードのうちの、ソースノード及びシンクノードを除いたノードを汚染ノードとして抽出する。   Based on the directed graph acquired from the graph information storage unit 32 and the sanitizer node acquired from the extracted information storage unit 33, the contaminated node extraction unit 52 extracts a contaminated node from the nodes included in the directed graph. Specifically, the contamination node extraction unit 52 excludes a route passing through the sanitizer node from all the routes of the data flow included in the directed graph, and extracts the remaining route as a dangerous route (contamination route). Then, the contaminated node extraction unit 52 extracts nodes other than the source node and the sink node among the nodes included in the extracted dangerous route as the contaminated nodes.

下流ノード抽出部53は、グラフ情報記憶部32から取得した有向グラフと、抽出情報記憶部33から取得したサニタイザノードとに基づいて、有向グラフに含まれるノードのうちの、下流ノードを抽出する。具体的に、下流ノード抽出部53は、有向グラフに含まれる1つのサニタイザノードからシンクノードまでの全ての経路に含まれるノードを下流ノードとして抽出する。また、下流ノード抽出部53は、この1つのサニタイザノードに対する下流ノードの抽出する処理を全てのサニタイザについて、同様に実行し、有向グラフに含まれるノードのうちの、全てのサニタイザに対する下流ノードを抽出する。   The downstream node extraction unit 53 extracts a downstream node among the nodes included in the directed graph based on the directed graph acquired from the graph information storage unit 32 and the sanitizer node acquired from the extraction information storage unit 33. Specifically, the downstream node extraction unit 53 extracts nodes included in all routes from one sanitizer node to the sink node included in the directed graph as downstream nodes. Further, the downstream node extraction unit 53 performs the processing for extracting the downstream node for one sanitizer node in the same manner for all the sanitizers, and extracts the downstream nodes for all the sanitizers among the nodes included in the directed graph. To do.

上流ノード抽出部54は、グラフ情報記憶部32から取得した有向グラフと、抽出情報記憶部33から取得したサニタイザノードとに基づいて、上流ノードを抽出する。具体的に、上流ノード抽出部54は、有向グラフに含まれる1つのサニタイザノードからソースノードまで遡る全ての経路に含まれるノードを上流ノードとして抽出する。また、上流ノード抽出部54は、この1つのサニタイザノードに対する上流ノードの抽出する処理を全てのサニタイザについて、同様に実行し、有向グラフに含まれるノードのうちの、全てのサニタイザに対する上流ノードを抽出する。   The upstream node extraction unit 54 extracts an upstream node based on the directed graph acquired from the graph information storage unit 32 and the sanitizer node acquired from the extraction information storage unit 33. Specifically, the upstream node extraction unit 54 extracts, as upstream nodes, nodes included in all paths that go back from one sanitizer node included in the directed graph to the source node. Further, the upstream node extraction unit 54 executes the process of extracting the upstream node for this single sanitizer similarly for all the sanitizers, and extracts the upstream nodes for all the sanitizers among the nodes included in the directed graph. To do.

候補抽出部55(第2の抽出部)は、抽出情報記憶部33が記憶する汚染ノードと下流ノードと上流ノードとに基づいて、サニタイザを配置するノードの候補を示す候補ノードを抽出する。具体的に、候補抽出部55は、汚染ノードの集合から、下流ノードの集合及び上流ノードの集合を除外した候補集合に含まれるノードを、候補ノードとして抽出する。また、候補抽出部55は、図7に示すように、抽出した候補ノードを示す「候補ノード情報」と、「ソースノード情報」と、「シンクノード情報」とを関連付けて、候補情報記憶部34に記憶させる。また、ノード候補抽出部55は、抽出した候補ノードに対応するソースコード上の位置を示す情報(候補ノード位置情報)を結果出力部56に出力させる。ここで、ソースコードの位置(候補ノード位置情報)とは、ソースコードのファイル名とソースコード上の行番号とを含む情報である。   The candidate extraction unit 55 (second extraction unit) extracts a candidate node indicating a candidate node for arranging the sanitizer based on the contaminated node, the downstream node, and the upstream node stored in the extraction information storage unit 33. Specifically, the candidate extraction unit 55 extracts, as candidate nodes, nodes included in the candidate set obtained by excluding the set of downstream nodes and the set of upstream nodes from the set of contaminated nodes. Further, as illustrated in FIG. 7, the candidate extraction unit 55 associates “candidate node information” indicating the extracted candidate node, “source node information”, and “sink node information” with each other, and stores the candidate information storage unit 34. Remember me. In addition, the node candidate extraction unit 55 causes the result output unit 56 to output information indicating the position on the source code corresponding to the extracted candidate node (candidate node position information). Here, the position of the source code (candidate node position information) is information including the file name of the source code and the line number on the source code.

また、候補抽出部55は、候補ノードとして抽出したノードのうちで、サニタイザノードを配置する優先順位付けを実行してもよい。例えば、候補抽出部55は、抽出した候補ノードのうち、有向グラフ上の経路においてシンクノードに最も近いノードを、最優先順位の候補ノードとして抽出する。また、例えば、候補抽出部55は、抽出した候補ノードのうち、有向グラフ上の経路において分岐先となるノードに対して、候補ノードとしての優先順位を下げる。これは、分岐先となるノードにサニタイザを配置する場合、複数のノードにサニタイザを配置する必要が生じるため、候補抽出部55は、候補ノードとしての優先順位を下げる。
また、候補抽出部55は、例えば、抽出した候補ノードのうち、有向グラフ上の経路において分岐の収束先となるノードに対して、候補ノードとしての優先順位を上げる。これは、分岐の収束先となるノードにサニタイザを配置する場合、1つのサニタイザを配置することで複数の経路を無害化することができるため、候補抽出部55は、候補ノードとしての優先順位を上げる。
In addition, the candidate extraction unit 55 may execute prioritization of arranging the sanitizer node among the nodes extracted as candidate nodes. For example, the candidate extraction unit 55 extracts a node closest to the sink node in the route on the directed graph among the extracted candidate nodes as the candidate node having the highest priority. In addition, for example, the candidate extraction unit 55 lowers the priority as a candidate node for a node that is a branch destination in a route on the directed graph among the extracted candidate nodes. This is because when a sanitizer is placed at a branch destination node, the sanitizer needs to be placed at a plurality of nodes, so the candidate extraction unit 55 lowers the priority order as a candidate node.
Further, for example, the candidate extraction unit 55 increases the priority as a candidate node with respect to a node that becomes a branch convergence destination in a route on the directed graph among the extracted candidate nodes. This is because when a sanitizer is arranged at a node that is a convergence destination of a branch, a single sanitizer can be used to detoxify a plurality of paths, so that the candidate extraction unit 55 sets the priority as a candidate node. increase.

結果出力部56(出力部)は、候補抽出部55からの指示に基づいて、候補抽出部55が抽出した候補ノードに対応するソースコード上の位置を示す情報(候補ノード位置情報)を表示部40に出力し、表示部40に、この候補ノード位置情報を表示させる。   The result output unit 56 (output unit) displays information (candidate node position information) indicating the position on the source code corresponding to the candidate node extracted by the candidate extraction unit 55 based on the instruction from the candidate extraction unit 55 The candidate node position information is displayed on the display unit 40.

次に、本実施形態における検証装置1の動作について、図面を参照して説明する。
まず、検証装置1の全体の動作について説明する。
図8は、本実施形態における検証装置1の動作の一例を示すフローチャートである。
検証装置1は、ユーザによって、入力部10から検証対象となるソースコードが指定されると、検証処理を開始する。
Next, operation | movement of the verification apparatus 1 in this embodiment is demonstrated with reference to drawings.
First, the overall operation of the verification apparatus 1 will be described.
FIG. 8 is a flowchart showing an example of the operation of the verification apparatus 1 in the present embodiment.
The verification device 1 starts the verification process when the source code to be verified is specified from the input unit 10 by the user.

図8において、検証装置1は、まず、ソースコードを取得し、データフロー解析をする(ステップS101)。すなわち、検証装置1のデータフロー解析部51は、ソースコード記憶部20から検証対象となるソースコード(ソースコードファイル)を取得し、取得したソースコードに含まれるソースノード、シンクノード、及びサニタイザノードを抽出する。なお、データフロー解析部51は、ソースコードの記述の中から、ルール情報記憶部31が記憶するソース記述情報、シンク記述情報、及び無害化記述情報を検索することにより、ソースノード、シンクノード、及びサニタイザノードを抽出する。データフロー解析部51は、図6に示すように、抽出したサニタイザノードの「サニタイザノード情報」を、「ソースノード情報」及び「シンクノード情報」に関連付けて抽出情報記憶部33に記憶させる。   In FIG. 8, the verification apparatus 1 first acquires a source code and performs data flow analysis (step S101). That is, the data flow analysis unit 51 of the verification apparatus 1 acquires the source code (source code file) to be verified from the source code storage unit 20, and the source node, sink node, and sanitizer included in the acquired source code Extract nodes. The data flow analysis unit 51 searches the source description, the sink description information, and the detoxification description information stored in the rule information storage unit 31 from the description of the source code, thereby obtaining the source node, the sink node, And sanitizer nodes. As shown in FIG. 6, the data flow analysis unit 51 stores the “sanitizer node information” of the extracted sanitizer node in the extraction information storage unit 33 in association with “source node information” and “sink node information”. .

また、データフロー解析部51は、ソースコードのデータに関する処理の流れ(データフロー)を追跡し、データフローが有する経路のうちのサニタイザを通過しない経路を抽出し、ソースコードが安全であるか否かを判定する。
ここで、図9を参照して、データフロー解析部51によるデータフロー解析処理について詳細に説明する。
In addition, the data flow analysis unit 51 traces the processing flow (data flow) related to the data of the source code, extracts a route that does not pass through the sanitizer among routes that the data flow has, and determines whether the source code is safe. Determine whether.
Here, the data flow analysis processing by the data flow analysis unit 51 will be described in detail with reference to FIG.

図9は、本実施形態におけるデータフロー解析の一例を示す模式図である。
図9において、ソースコードS1は、解析対象となるソースコードを示している。この図に示す例では、ソースコードS1は、行番号“01”から行番号“12”までの12行のプログラムであり、行番号“01”に対応するノードN1がソースノードを示している。また、行番号“07”に対応するノードN2がサニタイザノードを示し、行番号“12”に対応するノードN4がシンクノードを示している。
このようなソースコードS1に対して、データフロー解析部51は、まず、ルール情報記憶部31を参照し、ソースノード、シンクノード、及びサニタイザノードを抽出する。例えば、ノードN1の“req.getParameter(”name”);”は、図4に示す「ソース情報」のソース記述情報の“getParameter()”と一致するので、データフロー解析部51は、ノードN1をソースノードとして抽出する。また、同様に、データフロー解析部51は、ノードN2をサニタイザノードとして抽出し、ノードN4をシンクノードとして抽出する。
FIG. 9 is a schematic diagram illustrating an example of data flow analysis in the present embodiment.
In FIG. 9, a source code S1 indicates a source code to be analyzed. In the example shown in this figure, the source code S1 is a 12-line program from the line number “01” to the line number “12”, and the node N1 corresponding to the line number “01” indicates the source node. A node N2 corresponding to the row number “07” indicates a sanitizer node, and a node N4 corresponding to the row number “12” indicates a sink node.
For such source code S1, the data flow analysis unit 51 first refers to the rule information storage unit 31 and extracts a source node, a sink node, and a sanitizer node. For example, “req.getParameter (“ name ”);” of the node N1 matches “getParameter ()” of the source description information of “source information” shown in FIG. Is extracted as a source node. Similarly, the data flow analysis unit 51 extracts the node N2 as a sanitizer node and extracts the node N4 as a sink node.

このように、ソースノード、シンクノード、及びサニタイザノードを抽出した後に、データフロー解析部51は、データフロー解析として、データに関する処理の流れを追跡する。この例では、データに関する処理の流れは、データD1(ソース)→データD2→データD3→データD4→データD7(シンク)となる経路K1と、データD1(ソース)→データD2→データD5→データD6→データD7(シンク)となる経路K2との2つの経路がある。この場合、データフロー解析部51は、データフローを解析し、データフローグラフF1のよう有向グラフを生成する。すなわち、データフロー解析部51は、データフローグラフF1として、ノードN1→ノードN2→ノードN4の経路K1と、ノードN1→ノードN3→ノードN4の経路K2との2つの経路を有する有向グラフを生成する。なお、この例では、ソースコードS1の行番号“06”は、分岐命令であるため、データフローグラフF1は、行番号“07”のノードN2と、行番号“09”のノードN3とに分岐する。   As described above, after extracting the source node, the sink node, and the sanitizer node, the data flow analysis unit 51 tracks the flow of processing regarding data as data flow analysis. In this example, the flow of processing related to data is a route K1 of data D1 (source) → data D2 → data D3 → data D4 → data D7 (sink) and data D1 (source) → data D2 → data D5 → data. There are two paths, a path K2 that becomes D6 → data D7 (sink). In this case, the data flow analysis unit 51 analyzes the data flow and generates a directed graph such as the data flow graph F1. That is, the data flow analysis unit 51 generates a directed graph having two paths of a path K1 of node N1 → node N2 → node N4 and a path K2 of node N1 → node N3 → node N4 as the data flow graph F1. . In this example, since the line number “06” of the source code S1 is a branch instruction, the data flow graph F1 branches to the node N2 of the line number “07” and the node N3 of the line number “09”. To do.

また、この図の例では、経路K1は、サニタイザノード(ノードN2)を通過しているため、安全な経路であるが、経路K2は、サニタイザノードを通過していないため、危険な経路(危険経路)であり、結果として、データフロー解析部51は、ソースコードS1全体としては、「危険」と判定する。   In the example of this figure, the route K1 is a safe route because it passes through the sanitizer node (node N2), but the route K2 is a dangerous route because it does not pass through the sanitizer node. As a result, the data flow analyzing unit 51 determines that the source code S1 as a whole is “dangerous”.

図8のフローに戻り、ステップS102において、データフロー解析部51は、有向グラフを生成する。具体的に、データフロー解析部51は、解析したソースノードからシンクノードまでのデータフローに対応するデータフローグラフ(有向グラフ)を生成し、生成したデータフローグラフをグラフ情報記憶部32に記憶させる。例えば、データフロー解析部51は、図5に示すように、「ソースノード情報」と、「シンクノード情報」と、生成したデータフローグラフの「有向グラフ情報」とを関連付けて記憶する。
ここで、図10を参照して、データフロー解析部51による有向グラフ、及び、「有向グラフ情報」を生成する処理について説明する。
Returning to the flow of FIG. 8, in step S102, the data flow analysis unit 51 generates a directed graph. Specifically, the data flow analysis unit 51 generates a data flow graph (directed graph) corresponding to the data flow from the analyzed source node to the sink node, and stores the generated data flow graph in the graph information storage unit 32. For example, as illustrated in FIG. 5, the data flow analysis unit 51 stores “source node information”, “sink node information”, and “directed graph information” of the generated data flow graph in association with each other.
Here, a process of generating a directed graph and “directed graph information” by the data flow analysis unit 51 will be described with reference to FIG.

図10は、本実施形態における有向グラフの一例を示す模式図である。
また、図10は、本実施形態における有向グラフを示すリスト情報(「有向グラフ情報」)の一例を示す模式図である。
FIG. 10 is a schematic diagram illustrating an example of a directed graph in the present embodiment.
FIG. 10 is a schematic diagram illustrating an example of list information (“directed graph information”) indicating a directed graph in the present embodiment.

図10において、有向グラフF2は、ノードn1〜ノードn6を有し、ノードn1からノードn6にデータ処理が流れるデータフローグラフを示している。
また、図11に示すリスト情報L1は、図10に示す有向グラフF2を表現する情報である。図11において、リスト情報L1は、接続元のノードと接続先のノードとを対応付けた構成を含んでいる。
In FIG. 10, the directed graph F2 has a node n1 to a node n6, and shows a data flow graph in which data processing flows from the node n1 to the node n6.
Moreover, the list information L1 shown in FIG. 11 is information expressing the directed graph F2 shown in FIG. In FIG. 11, the list information L1 includes a configuration in which a connection source node and a connection destination node are associated with each other.

例えば、リスト情報L1の1行目は、ノードn1を接続元として、ノードn1から接続される各ノード(ここでは、ノードn2、ノードn3)を示している。また、リスト情報L1の2行目は、ノードn2を接続元として、ノードn2から接続される各ノード(ここでは、ノードn4、ノードn5)を示している。同様に、リスト情報L1の3行目は、ノードn3を接続元として、ノードn3から接続される各ノード(ここでは、ノードn6)を示し、リスト情報L1の4行目は、ノードn4を接続元として、ノードn4から接続される各ノード(ここでは、ノードn6)を示している。また、リスト情報L1の5行目は、ノードn5を接続元として、ノードn5から接続される各ノード(ここでは、ノードn6)を示している。   For example, the first line of the list information L1 indicates each node (here, the node n2 and the node n3) connected from the node n1 with the node n1 as a connection source. The second line of the list information L1 indicates each node (here, the node n4 and the node n5) connected from the node n2 with the node n2 as the connection source. Similarly, the third line of the list information L1 indicates each node (here, the node n6) connected from the node n3 with the node n3 as a connection source, and the fourth line of the list information L1 connects the node n4. As a source, each node connected from the node n4 (here, the node n6) is shown. The fifth line of the list information L1 indicates each node (here, node n6) connected from the node n5 with the node n5 as a connection source.

このように、リスト情報L1は、有向グラフF2を表現する情報であり、データフロー解析部51は、有向グラフF2に基づいて、リスト情報L1のような情報を生成し、生成した情報を「有向グラフ情報」として、グラフ情報記憶部32に記憶させる。   Thus, the list information L1 is information representing the directed graph F2, and the data flow analysis unit 51 generates information such as the list information L1 based on the directed graph F2, and the generated information is referred to as “directed graph information”. Is stored in the graph information storage unit 32.

なお、図8のステップS102において、データフロー解析部51は、生成した有向グラフ(データフローグラフ)をデータフロー解析結果として、結果出力部56を介して表示部40に表示させる。また、データフロー解析結果を表示させる際に、データフロー解析部51は、図12に示すように、ユーザの確認を容易にするように、危険経路のみを表示するようにしてもよい。   In step S102 of FIG. 8, the data flow analysis unit 51 displays the generated directed graph (data flow graph) on the display unit 40 via the result output unit 56 as a data flow analysis result. When displaying the data flow analysis result, the data flow analysis unit 51 may display only the dangerous route so as to facilitate the user's confirmation as shown in FIG.

図12は、本実施形態におけるデータフロー解析結果の一例を示す図である。
この図において、有向グラフG1は、図1に示した有向グラフと同一の構成であり、ソースノードsc1、ノードn01〜ノードn30、及びシンクノードsk1を有している。また、この図において、サブグラフSG1が危険経路であり、領域NA1及び領域NA1に含まれるノードは、安全が確認されているノードである。
図12に示す例では、データフロー解析部51は、データフロー解析結果として、サブグラフSG1を表示部40に表示させる。
FIG. 12 is a diagram illustrating an example of a data flow analysis result in the present embodiment.
In this figure, the directed graph G1 has the same configuration as the directed graph shown in FIG. 1, and includes a source node sc1, a node n01 to a node n30, and a sink node sk1. Moreover, in this figure, subgraph SG1 is a dangerous route, and nodes included in area NA1 and area NA1 are nodes whose safety has been confirmed.
In the example illustrated in FIG. 12, the data flow analysis unit 51 displays the subgraph SG1 on the display unit 40 as the data flow analysis result.

再び、図8のフローに戻り、ステップS103において、検証装置1は、候補ノードの抽出処理(サニタイザの候補抽出処理)を実行する。すなわち、検証装置1のノード抽出部60及び候補抽出部55が、サニタイザを配置(挿入)する候補ノードを抽出する。この候補ノードの抽出処理については、図13のフローチャートを参照して後述する。   Returning to the flow of FIG. 8 again, in step S103, the verification apparatus 1 executes candidate node extraction processing (sanitizer candidate extraction processing). That is, the node extraction unit 60 and the candidate extraction unit 55 of the verification apparatus 1 extract candidate nodes on which the sanitizer is arranged (inserted). This candidate node extraction processing will be described later with reference to the flowchart of FIG.

次に、検証装置1は、ステップS103において抽出した候補ノードのソースコード上の位置情報を出力する(ステップS104)。すなわち、検証装置1の結果出力部56は、候補抽出部55からの指示に基づいて、候補抽出部55が抽出した候補ノードに対応するソースコード上の位置を示す情報(位置情報)を表示部40に出力し、表示部40に、この位置情報を表示させる。ここで、候補ノードに対応するソースコード上の位置を示す情報とは、例えば、候補ノードを含むソースコードのファイル名、及び候補ノードに対応する行番号であり、結果出力部56は、候補ノードを含むソースコードのファイル名、及び候補ノードに対応する行番号を表示部40にさせる。
なお、表示部40にこの位置情報を表示する際に、結果出力部56は、データフロー解析の結果、及びデータフローグラフとともに、この位置情報を表示させてもよい。また、結果出力部56は、表示部40にこの位置情報を表示する際に、対応する候補ノードを含むソースコードの記述内容を表示し、候補ノードに対応する位置に、マークなどの情報を表示させてもよい。
検証装置1は、ステップS104の処理を実行後、検証処理を終了する。
Next, the verification apparatus 1 outputs the position information on the source code of the candidate node extracted in step S103 (step S104). That is, the result output unit 56 of the verification apparatus 1 displays information (position information) indicating the position on the source code corresponding to the candidate node extracted by the candidate extraction unit 55 based on the instruction from the candidate extraction unit 55. The position information is displayed on the display unit 40. Here, the information indicating the position on the source code corresponding to the candidate node is, for example, the file name of the source code including the candidate node and the line number corresponding to the candidate node. The display unit 40 is caused to display the file name of the source code including the line number corresponding to the candidate node.
When displaying the position information on the display unit 40, the result output unit 56 may display the position information together with the result of the data flow analysis and the data flow graph. Further, when displaying the position information on the display unit 40, the result output unit 56 displays the description content of the source code including the corresponding candidate node, and displays information such as a mark at the position corresponding to the candidate node. You may let them.
The verification apparatus 1 ends the verification process after executing the process of step S104.

次に、本実施形態における検証装置1の検証処理の1つ(図8のステップS103の処理)である制御部50によるサニタイザの候補抽出処理について説明する。
図13は、本実施形態におけるサニタイザの候補抽出処理の一例を示すフローチャートである。
また、図14〜図17は、本実施形態におけるサニタイザの候補抽出処理の手順の一例を説明する図である。
Next, a sanitizer candidate extraction process by the control unit 50, which is one of the verification processes of the verification apparatus 1 in the present embodiment (the process of step S103 in FIG. 8), will be described.
FIG. 13 is a flowchart illustrating an example of sanitizer candidate extraction processing according to the present embodiment.
14 to 17 are diagrams for explaining an example of a sanitizer candidate extraction process according to the present embodiment.

なお、図14〜図17において、有向グラフG1は、図1に示した有向グラフと同一の構成であり、ソースノードsc1、ノードn01〜ノードn30、及びシンクノードsk1を有している。以下、図14〜図17の有向グラフG1を参照しながら、図13に示すサニタイザの候補抽出処理について説明する。
本実施形態では、ソースノードが1つであり、シンクノードが1つである場合の候補抽出処理の一例について説明する。また、サニタイザは、図2に示すように、出力先であるシンクの種類により処理が異なるが、本実施形態では、サニタイザは、1つの種類のシンクに対応するサニタイザである場合について説明する。
14 to 17, the directed graph G1 has the same configuration as the directed graph shown in FIG. 1, and includes a source node sc1, a node n01 to a node n30, and a sink node sk1. Hereinafter, the sanitizer candidate extraction process shown in FIG. 13 will be described with reference to the directed graph G1 of FIGS.
In the present embodiment, an example of candidate extraction processing when there is one source node and one sink node will be described. As shown in FIG. 2, the sanitizer has different processing depending on the type of sink that is the output destination. In this embodiment, the sanitizer is a sanitizer corresponding to one type of sink.

図13において、まず、制御部50のノード抽出部60は、下流ノードを抽出する(ステップS201)。具体的に、ノード抽出部60の下流ノード抽出部53は、グラフ情報記憶部32から取得した有向グラフと、抽出情報記憶部33から取得したサニタイザノードとに基づいて、有向グラフに含まれるノードのうちの、下流ノードを抽出する。   In FIG. 13, first, the node extraction unit 60 of the control unit 50 extracts a downstream node (step S201). Specifically, the downstream node extraction unit 53 of the node extraction unit 60 includes, based on the directed graph acquired from the graph information storage unit 32 and the sanitizer node acquired from the extraction information storage unit 33, among the nodes included in the directed graph. The downstream node is extracted.

例えば、図14に示す例では、下流ノード抽出部53は、ソースノードsc1及びシンクノードsk2に対応する「有向グラフ情報」をグラフ情報記憶部32から取得するとともに、ソースノードsc1及びシンクノードsk2に対応する「サニタイザノード情報」を抽出情報記憶部33から取得する。下流ノード抽出部53は、取得した「有向グラフ情報」の中から「サニタイザノード情報」に対応するサニタイザノードを検索し、検索したサニタイザノードを始点として、有向グラフの経路上の下流に配置されているノード(下流ノード)を全て抽出する。下流ノード抽出部53は、抽出した下流ノードの集合(集合Aという)をソースノードsc1及びシンクノードsk2と関連付けて、抽出情報記憶部33に記憶させる。なお、図14に示す例では、サブグラフSG2が、下流ノードの集合(集合A)である。   For example, in the example illustrated in FIG. 14, the downstream node extraction unit 53 acquires “directed graph information” corresponding to the source node sc1 and the sink node sk2 from the graph information storage unit 32, and corresponds to the source node sc1 and the sink node sk2. "Sanitizer node information" to be acquired from the extracted information storage unit 33. The downstream node extraction unit 53 searches for the sanitizer node corresponding to the “sanitizer node information” from the acquired “directed graph information”, and is arranged downstream on the path of the directed graph starting from the searched sanitizer node. All nodes (downstream nodes) are extracted. The downstream node extraction unit 53 associates the extracted set of downstream nodes (referred to as set A) with the source node sc1 and the sink node sk2 and stores them in the extraction information storage unit 33. In the example illustrated in FIG. 14, the subgraph SG2 is a set of downstream nodes (set A).

次に、ノード抽出部60は、上流ノードを抽出する(ステップS202)。具体的に、ノード抽出部60の上流ノード抽出部54は、グラフ情報記憶部32から取得した有向グラフと、抽出情報記憶部33から取得したサニタイザノードとに基づいて、有向グラフに含まれるノードのうちの、上流ノードを抽出する。   Next, the node extraction unit 60 extracts an upstream node (step S202). Specifically, the upstream node extraction unit 54 of the node extraction unit 60 includes, based on the directed graph acquired from the graph information storage unit 32 and the sanitizer node acquired from the extraction information storage unit 33, among the nodes included in the directed graph. The upstream node is extracted.

例えば、図15に示す例では、上流ノード抽出部54は、ソースノードsc1及びシンクノードsk2に対応する「有向グラフ情報」をグラフ情報記憶部32から取得するとともに、ソースノードsc1及びシンクノードsk2に対応する「サニタイザノード情報」を抽出情報記憶部33から取得する。上流ノード抽出部54は、取得した「有向グラフ情報」の中から「サニタイザノード情報」に対応するサニタイザノードを検索し、検索したサニタイザノードを終点として、有向グラフの経路上の上流に配置されているノード(上流ノード)を全て抽出する。上流ノード抽出部54は、抽出した上流ノードの集合(集合Bという)をソースノードsc1及びシンクノードsk2と関連付けて、抽出情報記憶部33に記憶させる。なお、図15に示す例では、サブグラフSG3が、上流ノードの集合(集合B)である。   For example, in the example illustrated in FIG. 15, the upstream node extraction unit 54 acquires “directed graph information” corresponding to the source node sc1 and the sink node sk2 from the graph information storage unit 32 and corresponds to the source node sc1 and the sink node sk2. "Sanitizer node information" to be acquired from the extracted information storage unit 33. The upstream node extraction unit 54 searches the sanitizer node corresponding to the “sanitizer node information” from the acquired “directed graph information”, and is arranged upstream on the route of the directed graph with the searched sanitizer node as the end point. All nodes (upstream nodes) are extracted. The upstream node extraction unit 54 associates the extracted set of upstream nodes (referred to as set B) with the source node sc1 and the sink node sk2 and stores them in the extraction information storage unit 33. In the example illustrated in FIG. 15, the subgraph SG3 is a set of upstream nodes (set B).

次に、ノード抽出部60は、汚染ノードを抽出する(ステップS203)。具体的に、ノード抽出部60の汚染ノード抽出部52は、グラフ情報記憶部32から取得した有向グラフと、抽出情報記憶部33から取得したサニタイザノードとに基づいて、有向グラフに含まれる経路のうちのサニタイザを通過しない経路(危険経路)を抽出し、この危険経路上のノードを汚染ノードとして抽出する。   Next, the node extraction unit 60 extracts a contaminated node (step S203). Specifically, the contaminated node extraction unit 52 of the node extraction unit 60 is based on the directed graph acquired from the graph information storage unit 32 and the sanitizer node acquired from the extraction information storage unit 33, among the paths included in the directed graph. A route (dangerous route) that does not pass through the sanitizer is extracted, and a node on this dangerous route is extracted as a contaminated node.

例えば、図16に示す例では、汚染ノード抽出部52は、ソースノードsc1及びシンクノードsk2に対応する「有向グラフ情報」をグラフ情報記憶部32から取得するとともに、ソースノードsc1及びシンクノードsk2に対応する「サニタイザノード情報」を抽出情報記憶部33から取得する。汚染ノード抽出部52は、取得した「有向グラフ情報」の中から「サニタイザノード情報」に対応するサニタイザノードを検索し、検索したサニタイザノードを通過しない経路(危険経路)を抽出する。汚染ノード抽出部52は、この危険経路上に配置されているノード(汚染ノード)を全て抽出する。汚染ノード抽出部52は、抽出した汚染ノードの集合(集合Cという)をソースノードsc1及びシンクノードsk2と関連付けて、抽出情報記憶部33に記憶させる。なお、図16に示す例では、サブグラフSG1が、汚染ノードの集合(集合C)である。
なお、汚染ノード抽出部52は、データフロー解析部51が抽出した危険経路を利用して、汚染ノードを抽出してもよい。
For example, in the example illustrated in FIG. 16, the contaminated node extraction unit 52 acquires “directed graph information” corresponding to the source node sc1 and the sink node sk2 from the graph information storage unit 32, and corresponds to the source node sc1 and the sink node sk2. "Sanitizer node information" to be acquired from the extracted information storage unit 33. The contaminated node extraction unit 52 searches the acquired “directed graph information” for a sanitizer node corresponding to the “sanitizer node information”, and extracts a route (dangerous route) that does not pass through the searched sanitizer node. The contaminated node extraction unit 52 extracts all nodes (contaminated nodes) arranged on this dangerous route. The contaminated node extraction unit 52 stores the extracted set of contaminated nodes (referred to as set C) in the extracted information storage unit 33 in association with the source node sc1 and the sink node sk2. In the example shown in FIG. 16, the subgraph SG1 is a set of contaminated nodes (set C).
Note that the contaminated node extraction unit 52 may extract the contaminated node using the dangerous route extracted by the data flow analysis unit 51.

次に、制御部50の候補抽出部55は、候補ノードを抽出する(ステップS204)。すなわち、候補抽出部55は、抽出情報記憶部33が記憶する汚染ノードと下流ノードと上流ノードとに基づいて、サニタイザを配置するノードの候補を示す候補ノードを抽出する。具体的に、候補抽出部55は、汚染ノードの集合(集合C)から、下流ノードの集合(集合A)及び上流ノードの集合(集合B)を除外した候補集合(集合D=集合C−(集合A∪集合B))に含まれるノードを、候補ノードとして抽出する。   Next, the candidate extraction unit 55 of the control unit 50 extracts candidate nodes (step S204). That is, the candidate extraction unit 55 extracts a candidate node indicating a candidate node for arranging the sanitizer based on the contaminated node, the downstream node, and the upstream node stored in the extraction information storage unit 33. Specifically, the candidate extraction unit 55 excludes a set of downstream nodes (set A) and a set of upstream nodes (set B) from the set of contaminated nodes (set C) (set D = set C− ( Nodes included in set A∪set B)) are extracted as candidate nodes.

例えば、図17に示す例では、候補抽出部55は、ソースノードsc1及びシンクノードsk2に対応する「汚染ノード情報」、「上流ノード情報」、及び「下流ノード情報」を抽出情報記憶部33から取得する。候補抽出部55は、取得した「汚染ノード情報」(集合C)、「上流ノード情報」(集合B)、及び「下流ノード情報」(集合A)に基づいて、候補ノードの集合(集合D)を抽出する。候補抽出部55は、抽出した候補ノードの集合(集合D)をソースノードsc1及びシンクノードsk2と関連付けて、候補情報記憶部34に記憶させる。なお、図17に示す例では、サブグラフSG4が、候補ノードの集合(集合D)である。   For example, in the example illustrated in FIG. 17, the candidate extraction unit 55 extracts “contamination node information”, “upstream node information”, and “downstream node information” corresponding to the source node sc1 and the sink node sk2 from the extraction information storage unit 33. get. The candidate extraction unit 55 sets a set of candidate nodes (set D) based on the acquired “contaminated node information” (set C), “upstream node information” (set B), and “downstream node information” (set A). To extract. The candidate extraction unit 55 stores the extracted set of candidate nodes (set D) in the candidate information storage unit 34 in association with the source node sc1 and the sink node sk2. In the example shown in FIG. 17, the subgraph SG4 is a set of candidate nodes (set D).

次に、候補抽出部55は、候補ノードの優先順位を決定する(ステップS205)。具体的に、候補抽出部55は、抽出した候補ノードのうち、有向グラフ上の経路においてシンクノードに最も近いノードを、最優先順位の候補ノードとして決定する。なお、候補抽出部55は、汚染ノードの経路の有向グラフであるサブグラフSG1について、最優先順位の候補ノードとして決定したノードにサニタイザを配置した場合のデータフロー解析をデータフロー解析部51に実行させて、危険経路が解消されたか否かを判定してもよい。この判定の結果、危険経路が解消されていない場合には、候補抽出部55は、候補ノードの集合(集合D)うちの次に優先順位の高い別の候補ノードを最優先順位の候補ノードとして決定する。
例えば、図17に示す例では、候補抽出部55は、ノードn11を最優先順位の候補ノードとして決定する。また、候補抽出部55は、例えば、候補ノードの優先順位を、順位の高い方から順にノードn11→ノードn08→ノードn09又はノードn10と決定する。
Next, the candidate extraction unit 55 determines the priority order of candidate nodes (step S205). Specifically, the candidate extraction unit 55 determines a node closest to the sink node in the route on the directed graph among the extracted candidate nodes as the highest priority candidate node. Note that the candidate extraction unit 55 causes the data flow analysis unit 51 to perform data flow analysis when the sanitizer is arranged at the node determined as the highest priority candidate node for the subgraph SG1 that is the directed graph of the path of the contaminated node. It may be determined whether or not the dangerous route has been resolved. If the risk route is not resolved as a result of the determination, the candidate extraction unit 55 sets another candidate node having the next highest priority among the candidate node set (set D) as the highest priority candidate node. decide.
For example, in the example illustrated in FIG. 17, the candidate extraction unit 55 determines the node n11 as the highest priority candidate node. In addition, for example, the candidate extraction unit 55 determines the priority order of the candidate nodes in order from the highest order: node n11 → node n08 → node n09 or node n10.

なお、サニタイザが適用されたデータは、適用される前のデータよりデータ長が増加するため、サニタイザは、シンクノードに近い位置に配置することが好ましい。そのため、候補抽出部55は、例えば、候補ノードの集合(集合D)うち、シンクノードに近い候補ノードほど、優先順位を高くする。また、候補抽出部55は、候補ノードの集合(集合D)うち、有向グラフ上の経路において分岐先となる候補ノードに対して、優先順位を下げる。また、候補抽出部55は、候補ノードの集合(集合D)うち、有向グラフ上の経路において分岐の収束先となるノードに対して、候補ノードとしての優先順位を上げる。
制御部50は、ステップS205の処理を実行後、サニタイザの候補抽出処理を終了する。
Since the data length of the data to which the sanitizer is applied is larger than the data before the data is applied, the sanitizer is preferably arranged at a position close to the sink node. Therefore, for example, the candidate extraction unit 55 increases the priority order of candidate nodes closer to the sink node in the set of candidate nodes (set D). In addition, the candidate extraction unit 55 lowers the priority order of candidate nodes that are branch destinations in the route on the directed graph among the set of candidate nodes (set D). In addition, the candidate extraction unit 55 increases the priority as a candidate node for a node that is a convergence destination of a branch on a route on a directed graph among a set of candidate nodes (set D).
After executing the process of step S205, the control unit 50 ends the sanitizer candidate extraction process.

図18は、本実施形態における検証装置1の効果を説明する図である。
この図において、有向グラフG1は、図1、及び図14〜図17に示した有向グラフと同一の構成であり、ソースノードsc1、ノードn01〜ノードn30、及びシンクノードsk1を有している。なお、この図において、ノードn11は、最優先順位の候補ノードを示し、ノードn11にサニタイザを配置した場合のデータフロー解析の結果を示している。
FIG. 18 is a diagram for explaining the effect of the verification apparatus 1 in the present embodiment.
In this figure, the directed graph G1 has the same configuration as the directed graphs shown in FIGS. 1 and 14 to 17, and includes a source node sc1, a node n01 to a node n30, and a sink node sk1. In this figure, node n11 indicates the highest priority candidate node, and shows the result of data flow analysis when a sanitizer is arranged at node n11.

図18に示す例では、検証装置1が抽出した候補ノードであるノードn11にサニタイザを配置することで、ソースコードのデータフロー解析の結果が、「危険」から「安全」に変更になっている。このように、本実施形態における検証装置1は、サニタイザを適切に配置することができる。
また、検証装置1が、図12に示すようにデータフロー解析の結果として、危険経路(サブグラフSG1)のみを表示部40に表示する場合には、従来の技術のような人手によりサニタイザの配置位置を決定すると、サニタイザを二重に挿入してしまうことがある。
In the example illustrated in FIG. 18, the sanitizer is arranged in the node n11 that is the candidate node extracted by the verification device 1, and the result of the data flow analysis of the source code is changed from “danger” to “safe”. . Thus, the verification apparatus 1 in this embodiment can arrange a sanitizer appropriately.
Further, when the verification apparatus 1 displays only the dangerous route (subgraph SG1) on the display unit 40 as a result of the data flow analysis as shown in FIG. 12, the arrangement position of the sanitizer manually as in the conventional technique. If it is determined, sanitizers may be inserted twice.

例えば、図19は、従来の汚染解析によるサニタイザの二重挿入の一例を示す図である。この図において、有向グラフG1は、図12に示した有向グラフと同一の構成であり、ソースノードsc1、ノードn01〜ノードn30、及びシンクノードsk1を有している。また、この図において、サブグラフSG1が危険経路であり、領域NA1及び領域NA1に含まれるノードは、安全が確認されているノードである。   For example, FIG. 19 is a diagram showing an example of double insertion of a sanitizer by conventional contamination analysis. In this figure, the directed graph G1 has the same configuration as the directed graph shown in FIG. 12, and includes a source node sc1, a node n01 to a node n30, and a sink node sk1. Moreover, in this figure, subgraph SG1 is a dangerous route, and nodes included in area NA1 and area NA1 are nodes whose safety has been confirmed.

図19に示すように、データフロー解析の結果として、危険経路(サブグラフSG1)のみを表示部40に表示する場合には、ユーザは、ノードn05などの既に配置されているサニタイザを認識することができない。そのため、従来の汚染解析の技術では、人手によってサニタイザの位置を決定すると、サブグラフSG5ように、二重にサニタイザが挿入されてしまうことがある。   As shown in FIG. 19, when only the dangerous route (subgraph SG1) is displayed on the display unit 40 as a result of the data flow analysis, the user may recognize a sanitizer that is already arranged such as the node n05. Can not. Therefore, in the conventional contamination analysis technique, when the position of the sanitizer is manually determined, the sanitizer may be inserted twice as in the subgraph SG5.

上述のように、二重にサニタイザが挿入された場合には、サニタイザで変換されるデータは、図2の(f)「二重エスケープ結果」示す記述に変換される。図2の(f)の記述でシンクにデータを出力する場合、出力されるデータ(文字列)は、本来出力されるべき、図2の(d)の文字列ではなく、図2の(e)の文字列となる。例えば、“&”に二重にサニタイザの処理が実行された場合、“&amp;amp;”となり、この文字列がシンクにより、“&amp;”として出力され、本来の“&”が出力されない。
このように、従来の人手によってサニタイザの位置を決定する場合には、二重にサニタイザが挿入されることがあり、正しくデータを出力できないという問題がある。
これに対して、本実施形態における検証装置1は、上述した候補ノードの抽出処理により、二重にサニタイザを配置することのない適切な候補ノードを抽出する。そのため、本実施形態における検証装置1は、上述のような二重にサニタイザが挿入されることを未然に回避することができる。
As described above, when the sanitizer is inserted twice, the data converted by the sanitizer is converted into the description shown in (f) “double escape result” in FIG. When data is output to the sink in the description of (f) of FIG. 2, the output data (character string) is not the character string of (d) of FIG. ) Character string. For example, when the sanitizer process is executed twice for “&”, “&amp;amp;” is generated, and this character string is output as “&amp;” by the sync, and the original “&” is not output.
As described above, when the position of the sanitizer is determined manually, there is a problem that the sanitizer may be inserted twice, and data cannot be output correctly.
On the other hand, the verification device 1 according to the present embodiment extracts an appropriate candidate node that does not duplicately arrange sanitizers by the above-described candidate node extraction process. Therefore, the verification apparatus 1 in the present embodiment can avoid the double insertion of the sanitizer as described above.

以上説明したように、本実施形態における検証装置1は、データフロー解析部51と、ノード抽出部60(第1の抽出部)と、候補抽出部55(第2の抽出部)とを備えている。データフロー解析部51は、ソースコード記憶部20からソースコードを取得し、取得したソースコードに含まれるデータを入力するソースノード、データを出力するシンクノード、及びデータに含まれる脆弱性の原因となる特殊文字を無害化する処理に対応するサニタイザノードを、ソースノード、シンクノード、及びサニタイザノードのそれぞれに対応する記述を示す記述情報を記憶するルール情報記憶部31から取得した記述情報に基づいて抽出して、ソースコードのデータフローを解析する。さらに、データフロー解析部51は、ソースノードからシンクノードまでのノードを含むデータフローを示す有向グラフを生成する。ノード抽出部60は、データフロー解析部51が生成した有向グラフと、サニタイザノードとに基づいて、有向グラフに含まれるノードのうちの、汚染ノードと下流ノードと上流ノードとを抽出する。ここで、汚染ノードとは、サニタイザノードを通過しない経路上のノードである。また、下流ノードとは、サニタイザノードの下流に配置されたノードであり、上流ノードとは、サニタイザノードの上流に配置されたノードである。そして、候補抽出部55は、ノード抽出部60が抽出した汚染ノードと下流ノードと上流ノードとに基づいて、サニタイザを配置するノードの候補を示す候補ノードを抽出し、抽出した候補ノードに対応するソースコード上の位置を示す情報を結果出力部56に出力させる。   As described above, the verification apparatus 1 according to the present embodiment includes the data flow analysis unit 51, the node extraction unit 60 (first extraction unit), and the candidate extraction unit 55 (second extraction unit). Yes. The data flow analysis unit 51 acquires the source code from the source code storage unit 20, inputs the data included in the acquired source code, the sink node that outputs the data, and the cause of the vulnerability included in the data The description information acquired from the rule information storage unit 31 that stores the description information indicating the description corresponding to each of the source node, the sink node, and the sanitizer node is added to the sanitizer node corresponding to the processing for detoxifying the special character. Extract based on and analyze the data flow of the source code. Further, the data flow analysis unit 51 generates a directed graph indicating a data flow including nodes from the source node to the sink node. Based on the directed graph generated by the data flow analyzing unit 51 and the sanitizer node, the node extracting unit 60 extracts a contaminated node, a downstream node, and an upstream node among the nodes included in the directed graph. Here, the contaminated node is a node on a route that does not pass through the sanitizer node. The downstream node is a node arranged downstream of the sanitizer node, and the upstream node is a node arranged upstream of the sanitizer node. Then, the candidate extraction unit 55 extracts candidate nodes indicating candidate nodes for arranging the sanitizer based on the contaminated node, the downstream node, and the upstream node extracted by the node extraction unit 60, and corresponds to the extracted candidate node. Information indicating a position on the source code is output to the result output unit 56.

これにより、本実施形態における検証装置1は、サニタイザを配置する適切な候補ノードを抽出することができるので、ユーザは、ソースコードに脆弱性があった場合に、サニタイザを適切に配置することができる。
また、サニタイザを配置する位置を、人間が注意深く決定する必要がなくなるので、本実施形態における検証装置1は、サニタイザを適切に配置するようにソースコードを修正する作業工数を低減することができる。例えば、ソースコードの規模が大きい又は複雑でソースからシンクまでの経路が膨大に検出された場合であっても、本実施形態における検証装置1は、サニタイザを適切に配置するように修正する作業工数(人的な修正コスト)を低減することができる。すなわち、本実施形態における検証装置1は、静的解析によるソースコードの検証にかかる作業工数を低減することができる。
よって、本実施形態における検証装置1は、作業工数を低減しつつ、サニタイザを適切に配置することができる。
Thereby, since the verification apparatus 1 in this embodiment can extract an appropriate candidate node for arranging the sanitizer, the user can appropriately arrange the sanitizer when the source code is vulnerable. it can.
In addition, since it is not necessary for a human to carefully determine the position at which the sanitizer is disposed, the verification apparatus 1 according to the present embodiment can reduce the number of work steps for correcting the source code so that the sanitizer is appropriately disposed. For example, even when the source code is large or complicated and the path from the source to the sink is detected enormously, the verification apparatus 1 in this embodiment corrects the manipulator to properly arrange the sanitizer. (Human correction cost) can be reduced. That is, the verification apparatus 1 according to the present embodiment can reduce the number of work steps required for verification of the source code by static analysis.
Therefore, the verification apparatus 1 in this embodiment can arrange a sanitizer appropriately, reducing work man-hours.

なお、本実施形態における検証装置1は、上流ノードと下流ノードとに基づいて、候補ノードを抽出するので、既に安全が確認されている経路も含めて、適切な候補ノードを抽出することができる。そのため、本実施形態における検証装置1は、上述したような二重にサニタイザが挿入されることを未然に回避することができる。   In addition, since the verification apparatus 1 in this embodiment extracts a candidate node based on an upstream node and a downstream node, it is possible to extract an appropriate candidate node including a route whose safety has already been confirmed. . Therefore, the verification apparatus 1 in the present embodiment can avoid the double insertion of the sanitizer as described above.

また、本実施形態では、候補抽出部55は、汚染ノードの集合(集合C)から、下流ノードの集合(集合B)及び上流ノードの集合(集合A)を除外した候補集合(集合D)に含まれるノードを候補ノードとして抽出する。
これにより、汚染ノードの集合からサニタイザを通過しないノードを簡易な手段で適切に抽出することができるので、本実施形態における検証装置1は、サニタイザを配置する候補ノードを適切に抽出することができる。
Further, in the present embodiment, the candidate extraction unit 55 sets a candidate set (set D) by excluding the set of downstream nodes (set B) and the set of upstream nodes (set A) from the set of contaminated nodes (set C). The included nodes are extracted as candidate nodes.
Thereby, since a node that does not pass the sanitizer can be appropriately extracted from the set of contaminated nodes by a simple means, the verification apparatus 1 in the present embodiment can appropriately extract a candidate node on which the sanitizer is arranged. .

また、本実施形態では、候補抽出部55は、抽出した候補ノードのうち、有向グラフ上の経路においてシンクノードに最も近いノードを、最優先順位の候補ノードとして抽出する。
サニタイザは、上述したようにシンクノードに近い位置に配置することが好ましいため、これにより、本実施形態における検証装置1は、ユーザに対してサニタイザを配置する最優先順位の候補ノードを適切に提案することができる。
In the present embodiment, the candidate extraction unit 55 extracts a node closest to the sink node in the route on the directed graph among the extracted candidate nodes as the candidate node having the highest priority.
Since the sanitizer is preferably arranged at a position close to the sink node as described above, the verification apparatus 1 in the present embodiment appropriately proposes the candidate node with the highest priority for arranging the sanitizer for the user. can do.

また、本実施形態では、候補抽出部55は、第2の抽出部は、抽出した候補ノードのうち、有向グラフ上の経路において分岐先となるノードに対して、候補ノードとしての優先順位を下げる。
分岐先となるノードにサニタイザを配置する場合、複数のノードにサニタイザを配置する必要が生じるため、これにより、本実施形態における検証装置1は、ユーザに対してサニタイザを配置する数量を低減した適切な候補ノードを提案することができる。
Further, in the present embodiment, the candidate extraction unit 55 lowers the priority as a candidate node with respect to a node that becomes a branch destination in the route on the directed graph among the extracted candidate nodes.
When a sanitizer is arranged at a branch destination node, it is necessary to arrange a sanitizer at a plurality of nodes. Accordingly, the verification apparatus 1 according to the present embodiment can appropriately reduce the number of sanitizers arranged for the user. Candidate nodes can be proposed.

また、本実施形態では、候補抽出部55は、抽出した候補ノードのうち、有向グラフ上の経路において分岐の収束先となるノードに対して、候補ノードとしての優先順位を上げる。
分岐の収束先となるノードにサニタイザを配置する場合、1つのノードで効率よくサニタイザを配置することができるため、これにより、本実施形態における検証装置1は、ユーザに対してサニタイザを配置する効果の高い(効率のよい)適切な候補ノードを提案することができる。
Further, in the present embodiment, the candidate extraction unit 55 increases the priority as a candidate node with respect to a node that is a convergence destination of a branch on a route on the directed graph among the extracted candidate nodes.
When a sanitizer is arranged at a node that is a convergence destination of a branch, a sanitizer can be efficiently arranged at one node. Thus, the verification device 1 according to the present embodiment can effectively arrange a sanitizer for a user. It is possible to propose an appropriate candidate node having a high (high efficiency).

なお、本実施形態では、一例として、候補抽出部55は、最優先順位の候補ノードとして抽出するまでの処理を実行する場合について説明したが、サニタイザを最優先順位の候補ノードに配置するソースコードの修正処理までを候補抽出部55、又は制御部50が実行してもよい。この場合、ソースコードにサニタイザを挿入する修正処理を、人手を介さずに実行することができるので、検証装置1は、さらに作業工数を低減することができる。   In this embodiment, as an example, the candidate extraction unit 55 has been described as performing processing until extraction is performed as a candidate node with the highest priority. However, the source code for arranging the sanitizer at the candidate node with the highest priority. The candidate extraction unit 55 or the control unit 50 may execute up to the correction process. In this case, since the correction process for inserting the sanitizer into the source code can be executed without manual intervention, the verification apparatus 1 can further reduce the work man-hours.

次に、第2の実施形態について、図面を参照して説明する。
[第2の実施形態]
第2の実施形態では、図20に示すように、有向グラフが複数のソースと、1つのシンクとを有する場合において、検証装置1が、候補ノードの抽出処理(サニタイザの候補抽出処理)を実行する一例について説明する。
Next, a second embodiment will be described with reference to the drawings.
[Second Embodiment]
In the second embodiment, as illustrated in FIG. 20, when the directed graph includes a plurality of sources and one sink, the verification device 1 executes candidate node extraction processing (sanitizer candidate extraction processing). An example will be described.

なお、本実施形態における検証装置1の構成は、第1の実施形態と同様であり、ここではその説明を省略する。また、本実施形態における検証装置1の基本動作は、図8に示す第1の実施形態と同様であるので、ここではその説明を省略する。
本実施形態では、サニタイザの候補抽出処理の手順が第1の実施形態とは異なり、以下、サニタイザの候補抽出処理について説明する。
Note that the configuration of the verification apparatus 1 in the present embodiment is the same as that in the first embodiment, and the description thereof is omitted here. Further, the basic operation of the verification apparatus 1 in this embodiment is the same as that of the first embodiment shown in FIG.
In this embodiment, the procedure of the sanitizer candidate extraction process is different from that of the first embodiment, and the sanitizer candidate extraction process will be described below.

図20は、本実施形態におけるサニタイザの候補抽出処理の一例を説明する図である。
この図において有向グラフG2は、ソースノードsc1(「Source1」)、ソースノードsc2(「Source2」)、・・・、及びソースノードscN(「SourceN」)と、シンクノードsk1(「Sink1」)との間のデータフローを示すデータフローグラフである。この有向グラフG2は、ノードn02〜n16及びn18〜n30を含んでおり、このノードn02〜n16及びn18〜n30のうちの、ノードn05、ノードn06、ノードn16、及びノードn30がサニタイザに対応するサニタイザノードである。
FIG. 20 is a diagram illustrating an example of sanitizer candidate extraction processing according to the present embodiment.
In this figure, the directed graph G2 includes a source node sc1 (“Source1”), a source node sc2 (“Source2”),..., A source node scN (“SourceN”), and a sink node sk1 (“Sink1”). It is a data flow graph which shows the data flow between. The directed graph G2 includes nodes n02 to n16 and n18 to n30, and of these nodes n02 to n16 and n18 to n30, the node n05, the node n06, the node n16, and the node n30 correspond to the sanitizer. It is a node.

図20に示すように、本実施形態では、有向グラフG2は、複数のソースノードを有している。本実施形態におけるサニタイザの候補抽出処理では、検証装置1は、複数のソースノードのうちの1つと1つのシンクノード(sk1)との間のサブグラフにおいて、サニタイザの候補ノードを抽出する処理を、全てのソースノードに対して実行し、それぞれの処理で抽出した候補ノードの和集合に含まれるノードを候補ノードとして抽出する。   As shown in FIG. 20, in this embodiment, the directed graph G2 has a plurality of source nodes. In the sanitizer candidate extraction process in the present embodiment, the verification apparatus 1 performs all the processes for extracting the sanitizer candidate nodes in the subgraph between one of the plurality of source nodes and one sink node (sk1). The node included in the union of the candidate nodes extracted in each process is extracted as a candidate node.

次に、本実施形態におけるサニタイザの候補抽出処理について、図21を参照して説明する。
図21は、本実施形態におけるサニタイザの候補抽出処理の一例を示すフローチャートである。
この図において、まず、制御部50の候補抽出部55は、ソース番号nに“1”を代入する(ステップS301)。すなわち、候補抽出部55は、図20に示すソースノードsc1(「Source1」)を選択し、ソースノードsc1(「Source1」)と、シンクノードsk1(「Sink1」)との間のサブグラフSG21を選択する。
Next, sanitizer candidate extraction processing according to the present embodiment will be described with reference to FIG.
FIG. 21 is a flowchart illustrating an example of sanitizer candidate extraction processing according to the present embodiment.
In this figure, first, the candidate extraction unit 55 of the control unit 50 substitutes “1” for the source number n (step S301). That is, the candidate extraction unit 55 selects the source node sc1 (“Source1”) shown in FIG. 20, and selects the subgraph SG21 between the source node sc1 (“Source1”) and the sink node sk1 (“Sink1”). To do.

次に、候補抽出部55は、n番目のソースを設定する(ステップS302)。
続く、ステップS303〜ステップS306までの処理は、図13のステップS201〜ステップS204までの処理と同様であるので、ここでは説明を省略する。なお、ソース番号nが“1”である場合には、制御部50のノード抽出部60及び候補抽出部55は、ステップS303〜ステップS306において、上述のサブグラフSG21に対応する候補ノードを抽出する。なお、候補抽出部55は、抽出した候補ノードと、n番目のソースノードを示す「ソースノード情報」及びシンクノードsk1を示す「シンクノード情報」の組情報とを関連付けて、候補情報記憶部34に記憶させる。
Next, the candidate extraction unit 55 sets the nth source (step S302).
The subsequent processing from step S303 to step S306 is the same as the processing from step S201 to step S204 in FIG. When the source number n is “1”, the node extraction unit 60 and the candidate extraction unit 55 of the control unit 50 extract candidate nodes corresponding to the above-described subgraph SG21 in steps S303 to S306. The candidate extraction unit 55 associates the extracted candidate node with the set information of “source node information” indicating the nth source node and “sink node information” indicating the sink node sk1, and stores the candidate information storage unit 34. Remember me.

次に、ステップS307において、制御部50の候補抽出部55は、ソース番号nが“N”以上であるか否かを判定する。候補抽出部55は、ソース番号nが“N”以上である場合(ステップS307:YES)に、処理をステップS309に進める。また、候補抽出部55は、ソース番号nが“N”未満である場合(ステップS307:NO)に、処理をステップS308に進める。   Next, in step S307, the candidate extraction unit 55 of the control unit 50 determines whether or not the source number n is “N” or more. If the source number n is “N” or more (step S307: YES), the candidate extraction unit 55 advances the process to step S309. If the source number n is less than “N” (step S307: NO), the candidate extraction unit 55 advances the process to step S308.

ステップS308において、候補抽出部55は、ソース番号nに“1”を加算して、ソース番号nを更新し、処理をステップS302に進める。すなわち、候補抽出部55は、次のソースノード(例えば、ソースノードsc2(「Source2」、・・・、ソースノードscN(「SourceN」)とシンクノードsk1(「Sink1」)との間のサブグラフを選択して、同様に、候補ノードの抽出を繰り返す。   In step S308, the candidate extraction unit 55 adds “1” to the source number n, updates the source number n, and advances the processing to step S302. That is, the candidate extraction unit 55 generates a subgraph between the next source node (for example, the source node sc2 (“Source2”,..., The source node scN (“SourceN”)) and the sink node sk1 (“Sink1”). In the same manner, extraction of candidate nodes is repeated.

また、ステップS309において、候補抽出部55は、候補ノードの優先順位を決定する。ここでは、候補抽出部55は、各サブグラフにおいて抽出した候補ノードの集合の和集合に対して、図13のステップS205と同様の処理を実行する。具体的に、候補抽出部55は、n番目のソースノードを示す「ソースノード情報」及びシンクノードsk1を示す「シンクノード情報」の組情報と関連付けて候補情報記憶部34に記憶されている候補ノードを、1番目〜N番目まで順番に取得し、候補ノードの集合の和集合を生成する。
なお、候補抽出部55は、上述の候補ノードの和集合において、ソースとシンクとの組み合わせのそれぞれに対して抽出した候補ノードが重複する場合に、重複する候補ノードに対して、候補ノードとしての優先順位を上げる。
制御部50は、ステップS309の処理を実行後、サニタイザの候補抽出処理を終了する。
In step S309, the candidate extraction unit 55 determines the priority order of the candidate nodes. Here, the candidate extraction unit 55 performs the same processing as step S205 of FIG. 13 on the union of the sets of candidate nodes extracted in each subgraph. Specifically, the candidate extraction unit 55 associates with the set information of “source node information” indicating the nth source node and “sink node information” indicating the sink node sk1 and stores them in the candidate information storage unit 34. Nodes are acquired in order from the first to the Nth, and a union of a set of candidate nodes is generated.
In addition, in the union of the above candidate nodes, when the candidate nodes extracted for each combination of the source and the sink overlap, the candidate extraction unit 55 determines the candidate node as a candidate node. Increase priority.
After executing the process of step S309, the control unit 50 ends the sanitizer candidate extraction process.

以上説明したように、本実施形態では、候補抽出部55は、有向グラフが複数の入力点ノードを含む場合に、ソースノードとシンクノードとの組み合わせのそれぞれに対して、候補ノードを抽出する。そして、候補抽出部55は、それぞれ抽出した候補ノードの和集合を候補ノードとして抽出する。
これにより、本実施形態における検証装置1は、ソースコードが、複数のソースを有しし、1つのシンクにおいてデータが出力される場合であっても、第1の実施形態と同様に、適切な候補ノードを抽出することができる。よって、本実施形態における検証装置1は、作業工数を低減しつつ、サニタイザを適切に配置することができる。
As described above, in this embodiment, the candidate extraction unit 55 extracts a candidate node for each combination of a source node and a sink node when the directed graph includes a plurality of input point nodes. And the candidate extraction part 55 extracts the union of each extracted candidate node as a candidate node.
As a result, the verification apparatus 1 according to the present embodiment is suitable as in the first embodiment even when the source code has a plurality of sources and data is output in one sink. Candidate nodes can be extracted. Therefore, the verification apparatus 1 in this embodiment can arrange a sanitizer appropriately, reducing work man-hours.

また、本実施形態では、候補抽出部55は、上述の候補ノードの和集合において、ソースとシンクとの組み合わせのそれぞれに対して抽出した候補ノードが重複する場合に、重複する候補ノードに対して、候補ノードとしての優先順位を上げる。
候補ノードが重複するノードにサニタイザを配置する場合、1つのノードで効率よくサニタイザを配置することができるため、これにより、本実施形態における検証装置1は、ユーザに対してサニタイザを配置する効果の高い(効率のよい)適切な候補ノードを提案することができる。
Further, in the present embodiment, the candidate extraction unit 55 determines whether a candidate node extracted for each combination of source and sink overlaps in the union set of candidate nodes described above. , Raise the priority as a candidate node.
When a sanitizer is arranged in a node where candidate nodes overlap, the sanitizer can be efficiently arranged in one node. Thus, the verification apparatus 1 in this embodiment has an effect of arranging the sanitizer for the user. High (efficient) suitable candidate nodes can be proposed.

次に、第3の実施形態について、図面を参照して説明する。
[第3の実施形態]
第3の実施形態では、図22に示すように、有向グラフが複数のソースと、複数のシンクとを有する場合において、検証装置1が、候補ノードの抽出処理(サニタイザの候補抽出処理)を実行する一例について説明する。
Next, a third embodiment will be described with reference to the drawings.
[Third Embodiment]
In the third embodiment, as illustrated in FIG. 22, when the directed graph includes a plurality of sources and a plurality of sinks, the verification apparatus 1 executes candidate node extraction processing (sanitizer candidate extraction processing). An example will be described.

なお、本実施形態における検証装置1の構成は、第1の実施形態と同様であり、ここではその説明を省略する。また、本実施施形態における検証装置1の基本動作は、図8に示す第1の実施形態と同様であるので、ここではその説明を省略する。
本実施形態では、サニタイザの候補抽出処理の手順が第1、及び第2の実施形態とは異なり、以下、サニタイザの候補抽出処理について説明する。
Note that the configuration of the verification apparatus 1 in the present embodiment is the same as that in the first embodiment, and the description thereof is omitted here. Further, the basic operation of the verification apparatus 1 in the present embodiment is the same as that of the first embodiment shown in FIG.
In the present embodiment, the sanitizer candidate extraction process is different from the first and second embodiments, and the sanitizer candidate extraction process will be described below.

図22は、本実施形態におけるサニタイザの候補抽出処理の一例を説明する図である。
この図において有向グラフG3は、ソースノードsc1(「Source1」)、ソースノードsc2(「Source2」)、・・・、及びソースノードscN(「SourceN」)と、シンクノードsk1(「Sink1」)、シンクノードsk2(「Sink2」)、・・・、及びシンクノードsk1(「SinkM」)との間のデータフローを示すデータフローグラフである。この有向グラフG3は、ノードn02〜n16及びn18〜n30を含んでおり、このノードn02〜n16及びn18〜n30のうちの、ノードn05、ノードn06、ノードn16、及びノードn30がサニタイザに対応するサニタイザノードである。
FIG. 22 is a diagram illustrating an example of sanitizer candidate extraction processing according to this embodiment.
In this figure, the directed graph G3 includes a source node sc1 (“Source1”), a source node sc2 (“Source2”),..., A source node scN (“SourceN”), a sink node sk1 (“Sink1”), a sink 6 is a data flow graph showing a data flow between a node sk2 (“Sink2”),..., And a sink node sk1 (“SinkM”). This directed graph G3 includes nodes n02 to n16 and n18 to n30, and of these nodes n02 to n16 and n18 to n30, the node n05, the node n06, the node n16, and the node n30 correspond to the sanitizer. It is a node.

図22に示すように、本実施形態では、有向グラフG3は、複数のソースノードと複数のシンクを有している。本実施形態におけるサニタイザの候補抽出処理では、検証装置1は、複数のソースノードのうちの1つと複数のシンクノードのうちの1つのシンクノード(sk1)との間のサブグラフにおいて、サニタイザの候補ノードを抽出する処理を、全てのソースノードに対して実行し、それぞれの処理で抽出した候補ノードの和集合に含まれるノードを候補ノードとして抽出する(図22のサブグラフSG31)。そして、さらに、検証装置1は、シンクノードを変更して、全てのシンクノードに対して、同様の処理を実行し、それぞれの処理で抽出した候補ノードの和集合に含まれるノードを候補ノードとして抽出する。   As shown in FIG. 22, in the present embodiment, the directed graph G3 has a plurality of source nodes and a plurality of sinks. In the sanitizer candidate extraction process according to the present embodiment, the verification apparatus 1 uses a sanitizer candidate node in a subgraph between one of the plurality of source nodes and one sink node (sk1) of the plurality of sink nodes. Is extracted for all source nodes, and nodes included in the union of candidate nodes extracted in each process are extracted as candidate nodes (subgraph SG31 in FIG. 22). Further, the verification device 1 changes the sink node, executes the same processing for all the sink nodes, and sets a node included in the union of candidate nodes extracted in each processing as a candidate node. Extract.

次に、本実施形態におけるサニタイザの候補抽出処理について、図23を参照して説明する。
図23は、本実施形態におけるサニタイザの候補抽出処理の一例を示すフローチャートである。
この図において、まず、制御部50の候補抽出部55は、ソース番号nに“1”を代入し、シンク番号mに“1”を代入する(ステップS401)。すなわち、候補抽出部55は、図22に示すソースノードsc1(「Source1」)とシンクノードsk1(「Sink1」)とを選択する。
Next, sanitizer candidate extraction processing according to the present embodiment will be described with reference to FIG.
FIG. 23 is a flowchart illustrating an example of sanitizer candidate extraction processing according to the present embodiment.
In this figure, first, the candidate extraction unit 55 of the control unit 50 substitutes “1” for the source number n and “1” for the sync number m (step S401). That is, the candidate extraction unit 55 selects the source node sc1 (“Source1”) and the sink node sk1 (“Sink1”) shown in FIG.

次に、候補抽出部55は、n番目のソースと、m番目のシンクとを設定する(ステップS402)。
続く、ステップS403〜ステップS406までの処理は、図21のステップS302〜ステップS306までの処理と同様であるので、ここでは説明を省略する。
Next, the candidate extraction unit 55 sets the nth source and the mth sink (step S402).
The subsequent processing from step S403 to step S406 is the same as the processing from step S302 to step S306 in FIG.

次に、ステップS407において、制御部50の候補抽出部55は、ソース番号nが“N”以上であるか否かを判定する。候補抽出部55は、ソース番号nが“N”以上である場合(ステップS407:YES)に、処理をステップS409に進める。また、候補抽出部55は、ソース番号nが“N”未満である場合(ステップS407:NO)に、処理をステップS408に進める。   Next, in step S407, the candidate extraction unit 55 of the control unit 50 determines whether or not the source number n is “N” or more. If the source number n is “N” or more (step S407: YES), the candidate extraction unit 55 advances the process to step S409. If the source number n is less than “N” (step S407: NO), the candidate extraction unit 55 advances the process to step S408.

ステップS408において、候補抽出部55は、ソース番号nに“1”を加算して、ソース番号nを更新し、処理をステップS402に進める。すなわち、候補抽出部55は、次のソースノード(例えば、ソースノードsc2(「Source2」、・・・、ソースノードscN(「SourceN」)とシンクノードとの間のサブグラフを選択して、同様に、候補ノードの抽出を繰り返す。   In step S408, the candidate extraction unit 55 adds “1” to the source number n, updates the source number n, and advances the process to step S402. That is, the candidate extraction unit 55 selects the next source node (for example, the source node sc2 (“Source2”,...), The subgraph between the source node scN (“SourceN”) and the sink node, and similarly The extraction of candidate nodes is repeated.

また、ステップS409において、候補抽出部55は、シンク番号mが“M”以上であるか否かを判定する。候補抽出部55は、シンク番号mが“M”以上である場合(ステップS409:YES)に、処理をステップS411に進める。また、候補抽出部55は、シンク番号mが“M”未満である場合(ステップS409:NO)に、処理をステップS410に進める。   In step S409, the candidate extraction unit 55 determines whether the sync number m is “M” or more. If the sync number m is “M” or more (step S409: YES), the candidate extraction unit 55 advances the process to step S411. If the sync number m is less than “M” (step S409: NO), the candidate extraction unit 55 advances the process to step S410.

ステップS410において、候補抽出部55は、シンク番号mに“1”を加算して、シンク番号mを更新するとともに、ソース番号nに“1”を代入した後に、処理をステップS402に進める。すなわち、候補抽出部55は、ソースノードをソースノードsc1(「Source1」)に戻し、次のシンクノード(例えば、シンクノードsk2(「Sink2」、・・・、シンクノードskM(「SinkM」)との間のサブグラフを選択して、同様に、候補ノードの抽出を繰り返す。   In step S410, the candidate extraction unit 55 adds “1” to the sync number m to update the sync number m, and after substituting “1” for the source number n, the process proceeds to step S402. That is, the candidate extraction unit 55 returns the source node to the source node sc1 (“Source1”), and the next sink node (for example, the sink node sk2 (“Sink2”,..., The sink node skM (“SinkM”)). In the same manner, extraction of candidate nodes is repeated.

また、ステップS411において、候補抽出部55は、候補ノードの優先順位を決定する。ここでは、候補抽出部55は、各サブグラフにおいて抽出した候補ノードの集合の和集合に対して、図13のステップS205と同様の処理を実行する。なお、候補抽出部55は、上述の候補ノードの和集合において、ソースとシンクとの組み合わせのそれぞれに対して抽出した候補ノードが重複する場合に、重複する候補ノードに対して、候補ノードとしての優先順位を上げる。
制御部50は、ステップS411の処理を実行後、サニタイザの候補抽出処理を終了する。
In step S411, the candidate extraction unit 55 determines the priority order of the candidate nodes. Here, the candidate extraction unit 55 performs the same processing as step S205 of FIG. 13 on the union of the sets of candidate nodes extracted in each subgraph. In addition, in the union of the above candidate nodes, when the candidate nodes extracted for each combination of the source and the sink overlap, the candidate extraction unit 55 determines the candidate node as a candidate node. Increase priority.
After executing the process of step S411, the control unit 50 ends the sanitizer candidate extraction process.

なお、図23に示す手順では、候補抽出部55は、ソースとシンクとの全ての組み合わせに対する候補ノードの抽出が完了した後に、組み合わせのそれぞれにおいて抽出した候補ノードの和集合を生成する場合について説明したが、ソースノードsc1〜ソースノードscNの変更が完了するごとに、和集合を生成してもよい。すなわち、候補抽出部55は、各シンクノードに対して、第2の実施形態と同様の処理を実行し、全てのシンクノードの変更が完了した後に、再度、和集合を生成してもよい。   In the procedure shown in FIG. 23, the candidate extracting unit 55 generates a union of candidate nodes extracted in each combination after the extraction of candidate nodes for all combinations of the source and sink is completed. However, each time the change of the source node sc1 to the source node scN is completed, the union may be generated. That is, the candidate extraction unit 55 may perform the same processing as that of the second embodiment for each sink node, and generate the union again after all the sink nodes have been changed.

以上説明したように、本実施形態では、候補抽出部55は、有向グラフが複数の入力点ノード又は複数のシンクノードを含む場合に、ソースノードとシンクノードとの組み合わせのそれぞれに対して、候補ノードを抽出する。そして、候補抽出部55は、それぞれ抽出した候補ノードの和集合を候補ノードとして抽出する。
これにより、本実施形態における検証装置1は、ソースコードが、複数のソースを有しし、複数のシンクにおいてデータが出力される場合であっても、第1の実施形態と同様に、適切な候補ノードを抽出することができる。よって、本実施形態における検証装置1は、作業工数を低減しつつ、サニタイザを適切に配置することができる。
As described above, in the present embodiment, the candidate extraction unit 55 selects the candidate node for each combination of the source node and the sink node when the directed graph includes a plurality of input point nodes or a plurality of sink nodes. To extract. And the candidate extraction part 55 extracts the union of each extracted candidate node as a candidate node.
As a result, the verification apparatus 1 according to the present embodiment is suitable as in the first embodiment even when the source code has a plurality of sources and data is output at a plurality of sinks. Candidate nodes can be extracted. Therefore, the verification apparatus 1 in this embodiment can arrange a sanitizer appropriately, reducing work man-hours.

なお、本発明は、上記の各実施形態に限定されるものではなく、本発明の趣旨を逸脱しない範囲で変更可能である。
例えば、上記の各実施形態において、検証装置1が、ソースコード記憶部20、及び検証記憶部30を備える場合について説明したが、ソースコード記憶部20、及び検証記憶部30を、例えば、サーバ装置などの外部装置が備えてもよい。また、制御部50は、例えば、クライアント端末やアプリケーションサーバなどのコンピュータ装置であってもよい。また、入力部10又は表示部40は、検証装置1の外部に備えてもよい。例えば、入力部10及び表示部40は、検証装置1とネットワークにより接続されたクライアント端末などのコンピュータ装置が備えてもよい。
The present invention is not limited to the above embodiments, and can be modified without departing from the spirit of the present invention.
For example, in each of the embodiments described above, the case where the verification device 1 includes the source code storage unit 20 and the verification storage unit 30 has been described. However, the source code storage unit 20 and the verification storage unit 30 may be configured as, for example, a server device. Such an external device may be provided. The control unit 50 may be a computer device such as a client terminal or an application server, for example. Further, the input unit 10 or the display unit 40 may be provided outside the verification apparatus 1. For example, the input unit 10 and the display unit 40 may be provided in a computer device such as a client terminal connected to the verification device 1 via a network.

また、上記の各実施形態において、結果出力部56は、データフロー解析の結果、データフローグラフ、候補ノードに対応するソースコード上の位置を示す情報などの情報を、表示部40に出力する場合について説明したが、結果出力部56は、これらの情報を、ファイルサーバ装置などに、データファイルとして出力してもよい。
また、上記の各実施形態の候補抽出処理において、ノード抽出部60は、下流ノードの抽出処理、上流ノードの抽出処理、汚染ノードの抽出処理の順番に、処理を実行する場合について説明したが、これらの各処理を実行する順番は、これに限定されるものではない。ノード抽出部60は、上述の3つの処理のうち、いずれの処理を先に実行してもよい。
In each of the above embodiments, the result output unit 56 outputs information such as the data flow analysis result, the data flow graph, and information indicating the position on the source code corresponding to the candidate node to the display unit 40. However, the result output unit 56 may output the information as a data file to a file server device or the like.
Further, in the candidate extraction process of each embodiment described above, the node extraction unit 60 has been described as performing the process in the order of the downstream node extraction process, the upstream node extraction process, and the contaminated node extraction process. The order in which these processes are executed is not limited to this. The node extraction unit 60 may execute any one of the above three processes first.

また、上記の各実施形態では、図2の(a)「出力先」が1つの種類である場合(1つの種類のシンクである場合)について説明したが、ソースコードに複数の種類のシンクが存在する場合には、検証装置1は、それぞれの種類のシンクに対して、図8に示す検証処理を実行することで対応することができる。例えば、ソースコードに、HTMLによるシンクと、Javascriptによるシンクとが混在している場合には、検証装置1は、HTMLに対応したデータフロー解析、及びサニタイザの候補ノードの抽出を実行した後に、Javascriptに対応したデータフロー解析、及びサニタイザの候補ノードの抽出を同様に実行する。   Further, in each of the above-described embodiments, the case where (a) “output destination” in FIG. 2 is one type (in the case of one type of sink) has been described, but a plurality of types of sinks are included in the source code. In the case where it exists, the verification apparatus 1 can cope with each type of sink by executing the verification process shown in FIG. For example, if the source code includes both an HTML sink and a Javascript sink, the verification apparatus 1 executes the dataflow analysis corresponding to HTML and the extraction of the sanitizer candidate nodes, and then the JavaScript. The data flow analysis corresponding to the above and the extraction of the sanitizer candidate nodes are executed in the same manner.

なお、本発明における検証装置1の機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより上述した検証装置1の処理を行ってもよい。ここで、「記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行する」とは、コンピュータシステムにプログラムをインストールすることを含む。ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。
また、「コンピュータシステム」は、インターネットやWAN、LAN、専用回線等の通信回線を含むネットワークを介して接続された複数のコンピュータ装置を含んでもよい。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。このように、プログラムを記憶した記録媒体は、CD−ROM等の非一過性の記録媒体であってもよい。また、記録媒体には、当該プログラムを配信するために配信サーバからアクセス可能な内部または外部に設けられた記録媒体も含まれる。
なお、プログラムを複数に分割し、それぞれ異なるタイミングでダウンロードした後に検証装置1で合体される構成や、分割されたプログラムのそれぞれを配信する配信サーバが異なっていてもよい。さらに「コンピュータ読み取り可能な記録媒体」とは、ネットワークを介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。また、上記プログラムは、上述した機能の一部を実現するためのものであってもよい。さらに、上述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。
The above-described verification is performed by recording a program for realizing the function of the verification apparatus 1 in the present invention on a computer-readable recording medium, causing the computer system to read and execute the program recorded on the recording medium. The processing of the device 1 may be performed. Here, “loading and executing a program recorded on a recording medium into a computer system” includes installing the program in the computer system. The “computer system” here includes an OS and hardware such as peripheral devices.
Further, the “computer system” may include a plurality of computer devices connected via a network including a communication line such as the Internet, WAN, LAN, and dedicated line. The “computer-readable recording medium” refers to a storage device such as a flexible medium, a magneto-optical disk, a portable medium such as a ROM and a CD-ROM, and a hard disk incorporated in a computer system. As described above, the recording medium storing the program may be a non-transitory recording medium such as a CD-ROM. The recording medium also includes a recording medium provided inside or outside that is accessible from the distribution server in order to distribute the program.
Note that the program may be divided into a plurality of parts, downloaded at different timings, and combined in the verification apparatus 1 or the distribution server that distributes each of the divided programs may be different. Furthermore, the “computer-readable recording medium” holds a program for a certain period of time, such as a volatile memory (RAM) inside a computer system that becomes a server or a client when the program is transmitted via a network. Including things. The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, what is called a difference file (difference program) may be sufficient.

また、上述した機能の一部または全部を、LSI(Large Scale Integration)等の集積回路として実現してもよい。上述した各機能は個別にプロセッサ化してもよいし、一部、または全部を集積してプロセッサ化してもよい。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現してもよい。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いてもよい。   Moreover, you may implement | achieve part or all of the function mentioned above as integrated circuits, such as LSI (Large Scale Integration). Each function described above may be individually made into a processor, or a part or all of them may be integrated into a processor. Further, the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. In addition, when an integrated circuit technology that replaces LSI appears due to the advancement of semiconductor technology, an integrated circuit based on the technology may be used.

1 検証装置
10 入力部
20 ソースコード記憶部
30 検証記憶部
31 ルール情報記憶部
32 グラフ情報記憶部
33 抽出情報記憶部
34 候補情報記憶部
40 表示部
50 制御部
51 データフロー解析部
52 汚染ノード抽出部
53 下流ノード抽出部
54 上流ノード抽出部
55 候補抽出部
56 結果出力部
60 ノード抽出部
DESCRIPTION OF SYMBOLS 1 Verification apparatus 10 Input part 20 Source code storage part 30 Verification storage part 31 Rule information storage part 32 Graph information storage part 33 Extraction information storage part 34 Candidate information storage part 40 Display part 50 Control part 51 Data flow analysis part 52 Contamination node extraction Unit 53 downstream node extraction unit 54 upstream node extraction unit 55 candidate extraction unit 56 result output unit 60 node extraction unit

Claims (9)

ソースコードを記憶したソースコード記憶部から前記ソースコードを取得し、取得した前記ソースコードに含まれる、データを入力する入力点ノード、データを出力する出力点ノード、及びデータに含まれる脆弱性の原因となる特殊文字を無害化する処理に対応する無害化ノードを、前記入力点ノード、前記出力点ノード、及び前記無害化ノードのそれぞれに対応する記述を示す記述情報を記憶するルール情報記憶部から取得した前記記述情報に基づいて抽出して、前記ソースコードのデータフローを解析するとともに、前記入力点ノードから前記出力点ノードまでのノードを含む前記データフローを示す有向グラフを生成するデータフロー解析部と、
前記データフロー解析部が生成した前記有向グラフと、前記無害化ノードとに基づいて、前記有向グラフに含まれる前記ノードのうちの、前記無害化ノードを通過しない経路上のノードである汚染ノードと、前記無害化ノードの下流に配置されたノードである下流ノードと、前記無害化ノードの上流に配置されたノードである上流ノードとを抽出する第1の抽出部と、
前記第1の抽出部が抽出した前記汚染ノードと前記下流ノードと前記上流ノードとに基づいて、前記無害化する処理を配置するノードの候補を示す候補ノードを抽出し、抽出した前記候補ノードに対応する前記ソースコード上の位置を示す情報を出力部に出力させる第2の抽出部と
を備えることを特徴とする検証装置。
The source code is acquired from the source code storage unit storing the source code, and the input point node for inputting data, the output point node for outputting data, and the vulnerability included in the data included in the acquired source code A rule information storage unit for storing a detoxification node corresponding to a process for detoxifying a special character that causes a descriptive information indicating a description corresponding to each of the input point node, the output point node, and the detoxification node Data flow analysis that extracts based on the description information acquired from the source and analyzes the data flow of the source code and generates a directed graph showing the data flow including nodes from the input point node to the output point node And
Based on the directed graph generated by the data flow analysis unit and the detoxification node, a contamination node that is a node on a path that does not pass through the detoxification node among the nodes included in the directed graph; and A first extraction unit that extracts a downstream node that is a node disposed downstream of the detoxification node and an upstream node that is a node disposed upstream of the detoxification node;
Based on the contaminated node, the downstream node, and the upstream node extracted by the first extraction unit, a candidate node indicating a candidate of a node where the processing to be rendered harmless is arranged, and the extracted candidate node A verification apparatus comprising: a second extraction unit that causes an output unit to output information indicating a corresponding position on the source code.
前記第2の抽出部は、前記汚染ノードの集合から、前記下流ノードの集合及び前記上流ノードの集合を除外した候補集合に含まれるノードを、前記候補ノードとして抽出する
ことを特徴とする請求項1に記載の検証装置。
The second extraction unit extracts, as the candidate nodes, nodes included in a candidate set excluding the set of downstream nodes and the set of upstream nodes from the set of contaminated nodes. The verification apparatus according to 1.
前記第2の抽出部は、
抽出した前記候補ノードのうち、前記有向グラフ上の経路において前記出力点ノードに最も近いノードを、最優先順位の候補ノードとして抽出する
ことを特徴とする請求項1又は請求項2に記載の検証装置。
The second extraction unit includes
3. The verification device according to claim 1, wherein, among the extracted candidate nodes, a node closest to the output point node in a route on the directed graph is extracted as a candidate node having the highest priority. 4. .
前記第2の抽出部は、
抽出した前記候補ノードのうち、前記有向グラフ上の経路において分岐先となるノードに対して、前記候補ノードとしての優先順位を下げる
ことを特徴とする請求項1から請求項3のいずれか一項に記載の検証装置。
The second extraction unit includes
4. The priority as the candidate node is lowered with respect to a node that becomes a branch destination in the route on the directed graph among the extracted candidate nodes. 5. The verification device described.
前記第2の抽出部は、
抽出した前記候補ノードのうち、前記有向グラフ上の経路において分岐の収束先となるノードに対して、前記候補ノードとしての優先順位を上げる
ことを特徴とする請求項1から請求項4のいずれか一項に記載の検証装置。
The second extraction unit includes
5. The priority as the candidate node is increased with respect to a node that is a convergence destination of a branch in the route on the directed graph among the extracted candidate nodes. The verification device according to item.
前記第2の抽出部は、
前記有向グラフが複数の入力点ノード又は複数の出力点ノードを含む場合に、前記入力点ノードと前記出力点ノードとの組み合わせのそれぞれに対して、前記候補ノードを抽出する
ことを特徴とする請求項1から請求項5のいずれか一項に記載の検証装置。
The second extraction unit includes
The candidate node is extracted for each combination of the input point node and the output point node when the directed graph includes a plurality of input point nodes or a plurality of output point nodes. The verification device according to any one of claims 1 to 5.
前記第2の抽出部は、
前記組み合わせのそれぞれに対して抽出した前記候補ノードが重複する場合に、重複する前記候補ノードに対して、前記候補ノードとしての優先順位を上げる
ことを特徴とする請求項6に記載の検証装置。
The second extraction unit includes
The verification apparatus according to claim 6, wherein, when the candidate nodes extracted for each of the combinations overlap, the priority as the candidate node is increased with respect to the overlapping candidate nodes.
データフロー解析部が、ソースコードを記憶したソースコード記憶部から前記ソースコードを取得し、取得した前記ソースコードに含まれる、データを入力する入力点ノード、データを出力する出力点ノード、及びデータに含まれる脆弱性の原因となる特殊文字を無害化する処理に対応する無害化ノードを、前記入力点ノード、前記出力点ノード、及び前記無害化ノードのそれぞれに対応する記述を示す記述情報を記憶するルール情報記憶部から取得した前記記述情報に基づいて抽出して、前記ソースコードのデータフローを解析するとともに、前記入力点ノードから前記出力点ノードまでのノードを含む前記データフローを示す有向グラフを生成するデータフロー解析ステップと、
第1の抽出部が、前記データフロー解析ステップによって生成された前記有向グラフと、前記無害化ノードとに基づいて、前記有向グラフに含まれる前記ノードのうちの、前記無害化ノードを通過しない経路上のノードである汚染ノードと、前記無害化ノードの下流に配置されたノードである下流ノードと、前記無害化ノードの上流に配置されたノードである上流ノードとを抽出する第1の抽出ステップと、
第2の抽出部が、前記第1の抽出ステップによって抽出された前記汚染ノードと前記下流ノードと前記上流ノードとに基づいて、前記無害化する処理を配置するノードの候補を示す候補ノードを抽出し、抽出した前記候補ノードに対応する前記ソースコード上の位置を示す情報を出力部に出力させる第2の抽出ステップと
を含むことを特徴とする検証方法。
A data flow analysis unit acquires the source code from a source code storage unit that stores the source code, and is included in the acquired source code, an input point node that inputs data, an output point node that outputs data, and data Descriptive information indicating detoxification nodes corresponding to processing for detoxifying special characters that cause vulnerabilities included in the input point node, the output point node, and the detoxification node. A directed graph that is extracted based on the description information acquired from the stored rule information storage unit, analyzes the data flow of the source code, and shows the data flow including nodes from the input point node to the output point node A data flow analysis step to generate
The first extraction unit is on a path that does not pass through the detoxification node among the nodes included in the directed graph based on the directed graph generated by the data flow analysis step and the detoxification node. A first extraction step of extracting a contamination node that is a node, a downstream node that is a node disposed downstream of the detoxification node, and an upstream node that is a node disposed upstream of the detoxification node;
A second extraction unit extracts candidate nodes indicating candidate nodes for disposing of the detoxifying process based on the contaminated node, the downstream node, and the upstream node extracted in the first extraction step. And a second extraction step of causing the output unit to output information indicating the position on the source code corresponding to the extracted candidate node.
検証装置としてのコンピュータに、
データフロー解析部が、ソースコードを記憶したソースコード記憶部から前記ソースコードを取得し、取得した前記ソースコードに含まれる、データを入力する入力点ノード、データを出力する出力点ノード、及びデータに含まれる脆弱性の原因となる特殊文字を無害化する処理に対応する無害化ノードを、前記入力点ノード、前記出力点ノード、及び前記無害化ノードのそれぞれに対応する記述を示す記述情報を記憶するルール情報記憶部から取得した前記記述情報に基づいて抽出して、前記ソースコードのデータフローを解析するとともに、前記入力点ノードから前記出力点ノードまでのノードを含む前記データフローを示す有向グラフを生成するデータフロー解析ステップと、
第1の抽出部が、前記データフロー解析ステップによって生成された前記有向グラフと、前記無害化ノードとに基づいて、前記有向グラフに含まれる前記ノードのうちの、前記無害化ノードを通過しない経路上のノードである汚染ノードと、前記無害化ノードの下流に配置されたノードである下流ノードと、前記無害化ノードの上流に配置されたノードである上流ノードとを抽出する第1の抽出ステップと、
第2の抽出部が、前記第1の抽出ステップによって抽出された前記汚染ノードと前記下流ノードと前記上流ノードとに基づいて、前記無害化する処理を配置するノードの候補を示す候補ノードを抽出し、抽出した前記候補ノードに対応する前記ソースコード上の位置を示す情報を出力部に出力させる第2の抽出ステップと
を実行させるためのプログラム。
In the computer as a verification device,
A data flow analysis unit acquires the source code from a source code storage unit that stores the source code, and is included in the acquired source code, an input point node that inputs data, an output point node that outputs data, and data Descriptive information indicating detoxification nodes corresponding to processing for detoxifying special characters that cause vulnerabilities included in the input point node, the output point node, and the detoxification node. A directed graph that is extracted based on the description information acquired from the stored rule information storage unit, analyzes the data flow of the source code, and shows the data flow including nodes from the input point node to the output point node A data flow analysis step to generate
The first extraction unit is on a path that does not pass through the detoxification node among the nodes included in the directed graph based on the directed graph generated by the data flow analysis step and the detoxification node. A first extraction step of extracting a contamination node that is a node, a downstream node that is a node disposed downstream of the detoxification node, and an upstream node that is a node disposed upstream of the detoxification node;
A second extraction unit extracts candidate nodes indicating candidate nodes for disposing of the detoxifying process based on the contaminated node, the downstream node, and the upstream node extracted in the first extraction step. And a second extraction step for causing the output unit to output information indicating a position on the source code corresponding to the extracted candidate node.
JP2013043547A 2013-03-05 2013-03-05 Verification device, verification method, and program Active JP5941859B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013043547A JP5941859B2 (en) 2013-03-05 2013-03-05 Verification device, verification method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013043547A JP5941859B2 (en) 2013-03-05 2013-03-05 Verification device, verification method, and program

Publications (2)

Publication Number Publication Date
JP2014174577A true JP2014174577A (en) 2014-09-22
JP5941859B2 JP5941859B2 (en) 2016-06-29

Family

ID=51695781

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013043547A Active JP5941859B2 (en) 2013-03-05 2013-03-05 Verification device, verification method, and program

Country Status (1)

Country Link
JP (1) JP5941859B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101996879B1 (en) * 2018-11-16 2019-07-05 코드마인드(주) Method for symbolic execution and apparatus thereof
WO2020262456A1 (en) 2019-06-26 2020-12-30 コネクトフリー株式会社 Execution code provision method and software development system
JP2021068098A (en) * 2019-10-21 2021-04-30 矢崎総業株式会社 Vulnerability assessment device
JP2021068097A (en) * 2019-10-21 2021-04-30 矢崎総業株式会社 Brittleness analyzing device
JP2021524085A (en) * 2018-05-09 2021-09-09 中興通訊股▲ふん▼有限公司Zte Corporation Message processing methods, devices and systems

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070156644A1 (en) * 2006-01-05 2007-07-05 Microsoft Corporation SQL injection detector
JP2007233432A (en) * 2006-02-27 2007-09-13 Hitachi Software Eng Co Ltd Inspection method and apparatus for fragileness of application
JP2008299723A (en) * 2007-06-01 2008-12-11 Hitachi Systems & Services Ltd Program verification method and device
JP2010507165A (en) * 2006-10-19 2010-03-04 チェックマークス リミテッド Detect security vulnerabilities in source code

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070156644A1 (en) * 2006-01-05 2007-07-05 Microsoft Corporation SQL injection detector
JP2007233432A (en) * 2006-02-27 2007-09-13 Hitachi Software Eng Co Ltd Inspection method and apparatus for fragileness of application
JP2010507165A (en) * 2006-10-19 2010-03-04 チェックマークス リミテッド Detect security vulnerabilities in source code
JP2008299723A (en) * 2007-06-01 2008-12-11 Hitachi Systems & Services Ltd Program verification method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021524085A (en) * 2018-05-09 2021-09-09 中興通訊股▲ふん▼有限公司Zte Corporation Message processing methods, devices and systems
JP7133037B2 (en) 2018-05-09 2022-09-07 中興通訊股▲ふん▼有限公司 Message processing method, device and system
KR101996879B1 (en) * 2018-11-16 2019-07-05 코드마인드(주) Method for symbolic execution and apparatus thereof
WO2020262456A1 (en) 2019-06-26 2020-12-30 コネクトフリー株式会社 Execution code provision method and software development system
JP2021068098A (en) * 2019-10-21 2021-04-30 矢崎総業株式会社 Vulnerability assessment device
JP2021068097A (en) * 2019-10-21 2021-04-30 矢崎総業株式会社 Brittleness analyzing device
JP7074739B2 (en) 2019-10-21 2022-05-24 矢崎総業株式会社 Vulnerability assessment device
US11429728B2 (en) 2019-10-21 2022-08-30 Yazaki Corporation Vulnerability evaluation apparatus

Also Published As

Publication number Publication date
JP5941859B2 (en) 2016-06-29

Similar Documents

Publication Publication Date Title
JP5941859B2 (en) Verification device, verification method, and program
McBurney et al. Automatic source code summarization of context for java methods
US10261884B2 (en) Method for correcting violation of source code and computer readable recording medium having program performing the same
WO2015159501A1 (en) Verification property integration device, verification property integration method, and recording medium having verification property integration program stored therein
JP5845888B2 (en) Software correction apparatus, software correction system, software correction method, and software correction program
JP5176478B2 (en) Data flow analysis device, data flow analysis method, and data flow analysis program
JP7409197B2 (en) Elaboration of repair patterns for static analysis violations in software programs
JP2008299723A (en) Program verification method and device
JP5440287B2 (en) Symbolic execution support program, method and apparatus
JP2007041804A (en) Program generation device, program verification device, and verification program
JP2011096082A (en) Program analyzing method, program analyzing program and program analyzer
JP6502044B2 (en) Data analysis device, data analysis method, and program.
WO2020085129A1 (en) Test data generation device, test data generation method, and program
JP6547345B2 (en) Test case generation program, test case generation method and test case generation apparatus
WO2012133606A1 (en) Apparatus for setting affecting extent of program, and method of specifying affecting extent and method of extracting affecting program using same
JP2002108652A (en) Detector of program correlation
JP5964764B2 (en) Statement association determination apparatus, method, and program
Al Ishtiaq et al. Hermes: Unlocking Security Analysis of Cellular Network Protocols by Synthesizing Finite State Machines from Natural Language Specifications
US9792197B2 (en) Apparatus and program
JP2007219586A (en) Source code analysis device
US20240045973A1 (en) Symbol narrowing-down apparatus, program analysis apparatus, symbol extraction method, program analysis method, and non-transitory computer readable medium
JP2008176520A (en) Tag conversion device
JP6011988B2 (en) Impact range survey method and impact range survey device
JP5949889B2 (en) Software development support device
Murel Towards an Aesthetics of Comics: A Reconsideration of Comics Criticism

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150710

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160411

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160426

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160523

R150 Certificate of patent or registration of utility model

Ref document number: 5941859

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350