Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
db_version_name: '23-free'
oracle-sid: 'FREEPDB1'
oracle-version: "gvenzl/oracle-free:23-slim-faststart"
fips-enabled: true
run-sonar-scanner: true
services:
html_checker:
Expand Down Expand Up @@ -87,6 +88,19 @@ jobs:
# For PR build - test using target branch as framework, for branch build use self as testing framework
run: git clone --depth=1 --branch=${CI_BASE_REF:-$CI_REF_NAME} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR

- name: Enable FIPS 140 on Oracle DB
id: enable-fips
if: ${{ matrix.fips-enabled == true }}
run: |
docker exec oracle bash -c "
echo \"ALTER SYSTEM SET DBFIPS_140=TRUE SCOPE=SPFILE;
SHUTDOWN IMMEDIATE;
STARTUP;
PROMPT Should show true for DBFIPS_140
SELECT name, value FROM v$parameter WHERE name = 'DBFIPS_140';
EXIT;\" | sqlplus -s / as sysdba
"
docker exec oracle bash -c "until healthcheck.sh; do echo 'Waiting for DB restart...'; sleep 1; done"
- name: Update privileges on sources
run: chmod -R go+w ./{source,test,examples,${UTPLSQL_DIR}/source}

Expand Down
4 changes: 2 additions & 2 deletions source/core/ut_utils.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -1024,13 +1024,13 @@ create or replace package body ut_utils is
return regexp_replace(a_item,a_prefix||a_connector);
end;

function get_hash(a_data raw, a_hash_type binary_integer := dbms_crypto.hash_sh1) return t_hash is
function get_hash(a_data raw, a_hash_type binary_integer := dbms_crypto.hash_sh256) return t_hash is
begin
--We cannot run hash on null
return case when a_data is null then null else dbms_crypto.hash(a_data, a_hash_type) end;
end;

function get_hash(a_data clob, a_hash_type binary_integer := dbms_crypto.hash_sh1) return t_hash is
function get_hash(a_data clob, a_hash_type binary_integer := dbms_crypto.hash_sh256) return t_hash is
begin
--We cannot run hash on null
return case when a_data is null then null else dbms_crypto.hash(a_data, a_hash_type) end;
Expand Down
4 changes: 2 additions & 2 deletions source/core/ut_utils.pks
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,12 @@ create or replace package ut_utils authid definer is
/*
* Wrapper function for calling dbms_crypto.hash
*/
function get_hash(a_data raw, a_hash_type binary_integer := dbms_crypto.hash_sh1) return t_hash;
function get_hash(a_data raw, a_hash_type binary_integer := dbms_crypto.hash_sh256) return t_hash;

/*
* Wrapper function for calling dbms_crypto.hash
*/
function get_hash(a_data clob, a_hash_type binary_integer := dbms_crypto.hash_sh1) return t_hash;
function get_hash(a_data clob, a_hash_type binary_integer := dbms_crypto.hash_sh256) return t_hash;

/*
* Returns a hash value of suitepath based on input path and random seed
Expand Down
4 changes: 2 additions & 2 deletions source/reporters/ut_coverage_report_html_helper.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ create or replace package body ut_coverage_report_html_helper is

function object_id(a_object_full_name varchar2) return varchar2 is
begin
return rawtohex(dbms_crypto.hash(src => utl_raw.cast_to_raw(a_object_full_name), typ => dbms_crypto.hash_md5));
return rawtohex(dbms_crypto.hash(src => utl_raw.cast_to_raw(a_object_full_name), typ => dbms_crypto.HASH_SH256));
end;

function link_to_source_file(a_object_full_name varchar2) return varchar2 is
Expand Down Expand Up @@ -231,7 +231,7 @@ create or replace package body ut_coverage_report_html_helper is
l_title varchar2(100) := 'All files';
l_coverage_pct number(5, 2);
l_result ut_varchar2_rows;
l_id varchar2(50) := object_id(a_title);
l_id varchar2(100) := object_id(a_title);
l_unit_coverage ut_coverage.t_unit_coverage;
l_unit ut_coverage.t_object_name;
begin
Expand Down
2 changes: 1 addition & 1 deletion test/ut3_user/api/test_ut_run.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ Failures:%
l_results ut3_develop.ut_varchar2_list;
begin
select * bulk collect into l_random_results
from table ( ut3_develop.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 6 ) )
from table ( ut3_develop.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 123 ) )
where trim(column_value) is not null and column_value not like 'Finished in %'
and column_value not like '%Tests were executed with random order %';

Expand Down
Loading