This test creates a connection to the PGSQL database,
and creates a query string based on data in an environment
variable. This data is not checked for special elements, however, and
it is possible to construct a query string that performs unexpected
data retrievals or modifications.
org.apache.lucene.demo.IndexFiles:org.apache.lucene.demo.SearchFiles:org.apache.lucene.demo.facet.SimpleFacetsExample:org.apache.lucene.demo.facet.AssociationsFacetsExample
$SS_TC_DEPS/java/lucene/*:$SS_TC_ROOT/$SS_TC_INSTALL/classes/*:$SS_TC_ROOT/$SS_TC_INSTALL/*:$SS_TC_DEPS/java/stonesoup/database/postgres/*:$SS_TC_DEPS/java/stonesoup/socket/*:$SS_TC_DEPS/java/stonesoup/lttng/lttng-stonesoup-0.1.jar
UNSPECIFIED
UNSPECIFIED
java $SS_JAVA_OPTS -Djava.library.path=$SS_TC_DEPS/lib64/ -cp "$SS_JAVA_CLASSPATH"
env ANT_HOME=$SS_TC_DEPS/ant ant $SS_ANT_OPTS -Dstonesoup.database.postgres.required=yes -Dstonesoup.hibernate.postgres.required=no -Dstonesoup.hibernate.mysql.required=no -Dstonesoup.database.mysql.required=no -Dstonesoup.socket.required=yes -lib $SS_TC_DEPS/java/stonesoup/lttng/lttng-stonesoup-0.1.jar -Dstonesoup.socket.lib.dir="$SS_TC_DEPS/java/stonesoup/socket" -Dstonesoup.hibernate.mysql.lib.dir="$SS_TC_DEPS/java/stonesoup/hibernate/mysql" -Dstonesoup.hibernate.postgres.lib.dir="$SS_TC_DEPS/java/stonesoup/hibernate/postgres" -Dstonesoup.database.mysql.lib.dir="$SS_TC_DEPS/java/stonesoup/database/mysql" -Dstonesoup.database.postgres.lib.dir="$SS_TC_DEPS/java/stonesoup/database/postgres" -Dlib.dir=$SS_TC_DEPS/java/lucene -Ddist.dir="$SS_TC_ROOT/$SS_TC_INSTALL" -Dbuild.dir="$SS_TC_ROOT/$SS_TC_INSTALL" -Dstonesoup.lttng.lib.dir="$SS_TC_DEPS/java/stonesoup/lttng" -Dstonesoup.lttng.dummy.lib.dir="$SS_TC_DEPS/java/stonesoup/lttng-dummy" compile
index a single file
Environment variable defining test value.
NONE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_gvqyrpqwsmrwgfjc.sql
northwindlower_gvqyrpqwsmrwgfjc
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.IndexFiles -index $SS_TC_ROOT/$SS_TC_DATA/good-01-index -docs $SS_TC_ROOT/$SS_TC_DATA/good-01/
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
GOOD-01 AND GOOD-02 AND GOOD-03 AND GOOD-04 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
if [[ -a ../testData/good-01-index/_0.cfe ]]; then exit 0; else exit 1; fi;
if [[ -a ../testData/good-01-index/_0.cfs ]]; then exit 0; else exit 1; fi;
../testData/good-01-index/segments_1
good-01/segments_1
good-01-index/segments.gen
good-01/segments.gen
DOES_NOT_RETURN
CONTROLLED_EXIT
search a single indexed file for "bubbles"
Environment variable defining test value.
NONE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_lunsathvqrkfwtib.sql
northwindlower_lunsathvqrkfwtib
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query bubbles -index $SS_TC_ROOT/$SS_TC_DATA/good-02/index/
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
GOOD-02 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-02/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
index two files
Environment variable defining test value.
NONE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_ivjfffmqdtplfbrl.sql
northwindlower_ivjfffmqdtplfbrl
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.IndexFiles -index $SS_TC_ROOT/$SS_TC_DATA/good-03-index -docs $SS_TC_ROOT/$SS_TC_DATA/good-03/
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
GOOD-01 AND GOOD-02 AND GOOD-03 AND GOOD-04 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
if [[ -a ../testData/good-03-index/_0.cfe ]]; then exit 0; else exit 1; fi;
if [[ -a ../testData/good-03-index/_0.cfe ]]; then exit 0; else exit 1; fi;
../testData/good-03-index/segments_1
good-03/segments_1
../testData/good-03-index/segments.gen
good-03/segments.gen
DOES_NOT_RETURN
CONTROLLED_EXIT
search two indexed files
Environment variable defining test value.
NONE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_omormvcorbjhpacd.sql
northwindlower_omormvcorbjhpacd
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query Sawyer -index $SS_TC_ROOT/$SS_TC_DATA/good-04/index/
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
GOOD-04 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-04/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
search files
Environment variable defining test value.
NONE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_swfrgjoqajkhlseh.sql
northwindlower_swfrgjoqajkhlseh
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query microfilm -index $SS_TC_ROOT/$SS_TC_DATA/good-05/index/
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
GOOD-05 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-05/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
search by facets
Environment variable defining test value.
NONE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_nczefgrptjccfnyv.sql
northwindlower_nczefgrptjccfnyv
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.facet.SimpleFacetsExample
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
GOOD-06 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-06/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
search by facet association
Environment variable defining test value.
NONE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_uozseqsvvdqpavtf.sql
northwindlower_uozseqsvvdqpavtf
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.facet.AssociationsFacetsExample
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
GOOD-07 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-07/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
index a large number of files
Environment variable defining test value.
NONE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_skjnzzcbygukykdk.sql
northwindlower_skjnzzcbygukykdk
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.IndexFiles -index $SS_TC_ROOT/$SS_TC_DATA/good-08-index -docs $SS_TC_ROOT/$SS_TC_DATA/good-08/
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
GOOD-01 AND GOOD-02 AND GOOD-03 AND GOOD-04 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
if [[ -a ../testData/good-08-index/_0.cfe ]]; then exit 0; else exit 1; fi;
if [[ -a ../testData/good-08-index/_0.cfe ]]; then exit 0; else exit 1; fi;
../testData/good-08-index/segments_1
good-08/segments_1
../testData/good-08-index/segments.gen
good-08/segments.gen
DOES_NOT_RETURN
CONTROLLED_EXIT
search files using regular expression
Environment variable defining test value.
NONE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_nxlhxxubtvaenaji.sql
northwindlower_nxlhxxubtvaenaji
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query /\d\d\d/ -index $SS_TC_ROOT/$SS_TC_DATA/good-09/index/
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
GOOD-09 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-09/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
search files using fuzzy searching
Environment variable defining test value.
NONE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_gohohffetfhvjrfx.sql
northwindlower_gohohffetfhvjrfx
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query "password~ OR pengui*" -index $SS_TC_ROOT/$SS_TC_DATA/good-09/index/
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
GOOD-10 AND NOT TIMEOUT AND NOT CONTROLLED_EXIT
good-10/output.txt
DOES_NOT_RETURN
CONTROLLED_EXIT
Environment variable defining test value.
EXECUTE_UNAUTHORIZED_CODE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_ahkxjqswliivosmu.sql
northwindlower_ahkxjqswliivosmu
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.SearchFiles -query microfilm -index $SS_TC_ROOT/$SS_TC_DATA/good-05/index/
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
weakness_started_AfCCePA1mE27ESImObvG AND ((NOT PERFORMER AND (db_sql_output_1i55VO678W OR db_sql_output_Ekg4hT7cGi OR database_insert_check_qfGwsmVOoX) AND NOT timeout_oLfO7g5kSn) or (PERFORMER AND NOT ((db_sql_output_1i55VO678W OR db_sql_output_Ekg4hT7cGi OR database_insert_check_qfGwsmVOoX) OR timeout_oLfO7g5kSn OR controlled_exit_ty3uHHe9Ah)))
(NOT PERFORMER AND (db_sql_output_1i55VO678W OR db_sql_output_Ekg4hT7cGi OR database_insert_check_qfGwsmVOoX) AND NOT timeout_oLfO7g5kSn) or (PERFORMER AND NOT ((db_sql_output_1i55VO678W OR db_sql_output_Ekg4hT7cGi OR database_insert_check_qfGwsmVOoX) OR timeout_oLfO7g5kSn OR controlled_exit_ty3uHHe9Ah))
DOES_NOT_RETURN
CONTROLLED_EXIT
CONTINUED_EXECUTION
logfile.txt
Number of Rows Affected: 2
logfile.txt
Number of Rows Affected: 4
export PGPASSWORD=$DBPGPASSWORD; if `psql -U $DBPGUSER -h $DBPGHOST -d $SS_DBPGDATABASE -c "select * from shippers;" | grep -q "BadShipper2\|ShipAttack"`; then true; else false; fi;
None
stonesoup_trace:weakness_start
Environment variable defining test value.
EXECUTE_UNAUTHORIZED_CODE
/opt/stonesoup/workspace/scripts/northwind_create_northwindlower_gjohydjephgwbofa.sql
northwindlower_gjohydjephgwbofa
$SS_TC_ROOT/logs/execute/lttng
$SS_TC_DEPS/lib64/liblttng-stonesoup-java.so:$SS_TC_DEPS/lib64/liblttng-ust-fork.so
org.apache.lucene.demo.facet.AssociationsFacetsExample
DROP DATABASE IF EXISTS $SS_DBPGDATABASE;
weakness_started_VJCG66hJeoejhjiodE2x AND ((NOT PERFORMER AND (db_sql_output_j1wosah6Fr OR db_sql_output_zi9jW7HVXG OR database_insert_check_wusYCk3nIW) AND NOT timeout_qo9CV37hfB) or (PERFORMER AND NOT ((db_sql_output_j1wosah6Fr OR db_sql_output_zi9jW7HVXG OR database_insert_check_wusYCk3nIW) OR timeout_qo9CV37hfB OR controlled_exit_ACS8c63FBj)))
(NOT PERFORMER AND (db_sql_output_j1wosah6Fr OR db_sql_output_zi9jW7HVXG OR database_insert_check_wusYCk3nIW) AND NOT timeout_qo9CV37hfB) or (PERFORMER AND NOT ((db_sql_output_j1wosah6Fr OR db_sql_output_zi9jW7HVXG OR database_insert_check_wusYCk3nIW) OR timeout_qo9CV37hfB OR controlled_exit_ACS8c63FBj))
DOES_NOT_RETURN
CONTROLLED_EXIT
CONTINUED_EXECUTION
logfile.txt
Number of Rows Affected: 2
logfile.txt
Number of Rows Affected: 4
export PGPASSWORD=$DBPGPASSWORD; if `psql -U $DBPGUSER -h $DBPGHOST -d $SS_DBPGDATABASE -c "select * from shippers;" | grep -q "BadShipper2\|ShipAttack"`; then true; else false; fi;
None
stonesoup_trace:weakness_start