Unverified Commit 08b72f67 by Enkelmann Committed by GitHub

Limit acceptance tests to PRs to the master branch (#426)

parent f873345f
......@@ -5,6 +5,8 @@ on:
branches:
- master
pull_request:
branches:
- master
env:
CARGO_TERM_COLOR: always
......
......@@ -3,8 +3,8 @@
</p>
# cwe_checker #
![Acceptance tests](https://github.com/fkie-cad/cwe_checker/actions/workflows/acceptance-tests.yml/badge.svg)
![Unit tests](https://github.com/fkie-cad/cwe_checker/actions/workflows/unit-tests.yml/badge.svg)
![Acceptance tests](https://github.com/fkie-cad/cwe_checker/actions/workflows/acceptance-tests.yml/badge.svg?branch=master)
![Unit tests](https://github.com/fkie-cad/cwe_checker/actions/workflows/unit-tests.yml/badge.svg?branch=master)
![Docker-Pulls](https://img.shields.io/docker/pulls/fkiecad/cwe_checker.svg)
[![Documentation](https://img.shields.io/badge/doc-stable-green.svg)](https://fkie-cad.github.io/cwe_checker/index.html)
......
......@@ -101,7 +101,7 @@ impl<'a, T: AbstractDomain + DomainInsertion + HasTop + Eq + From<String>> Conte
/// Regex that filters format specifier from a format string.
pub fn re_format_specifier() -> Regex {
Regex::new(r#"%\d{0,2}([c,C,d,i,o,u,x,X,e,E,f,F,g,G,a,A,n,p,s,S]|hi|hd|hu|li|ld|lu|lli|lld|llu|lf|lg|le|la|lF|lG|lE|lA|Lf|Lg|Le|La|LF|LG|LE|LA)"#).expect("No valid regex!")
Regex::new(r"%\d{0,2}([c,C,d,i,o,u,x,X,e,E,f,F,g,G,a,A,n,p,s,S]|hi|hd|hu|li|ld|lu|lli|lld|llu|lf|lg|le|la|lF|lG|lE|lA|Lf|Lg|Le|La|LF|LG|LE|LA)").expect("No valid regex!")
}
/// Merges domains from multiple pointer targets. The merged domain serves as input to a format string.
......
......@@ -261,7 +261,7 @@ fn collect_tids_for_cwe_warning(
&caller_tid,
state.stack_id.get_tid(),
);
tids.extend(call_sequence_tids.into_iter());
tids.extend(call_sequence_tids);
}
// Build a string out of the TID list
tids.iter()
......
......@@ -64,7 +64,7 @@ pub fn parse_format_string_parameters(
// - `[\.]?\d*` matches the precision parameter (for printf-like functions)
// - `[cCdiouxXeEfFgGaAnpsS]` matches a format specifier without length parameter.
// - `hi|hd|hu|li|ld|lu|lli|lld|llu|lf|lg|le|la|lF|lG|lE|lA|Lf|Lg|Le|La|LF|LG|LE|LA` matches format specifiers with length parameter.
let re = Regex::new(r#"%[+\-#0]{0,1}\d*[\.]?\d*([cCdiouxXeEfFgGaAnpsS]|hi|hd|hu|li|ld|lu|lli|lld|llu|lf|lg|le|la|lF|lG|lE|lA|Lf|Lg|Le|La|LF|LG|LE|LA)"#)
let re = Regex::new(r"%[+\-#0]{0,1}\d*[\.]?\d*([cCdiouxXeEfFgGaAnpsS]|hi|hd|hu|li|ld|lu|lli|lld|llu|lf|lg|le|la|lF|lG|lE|lA|Lf|Lg|Le|La|LF|LG|LE|LA)")
.expect("No valid regex!");
let datatype_map: Vec<(Datatype, ByteSize)> = re
......
......@@ -371,7 +371,7 @@ impl LogThread {
let logs = logs_with_address
.values()
.cloned()
.chain(general_logs.into_iter())
.chain(general_logs)
.collect();
let cwes = collected_cwes.into_values().collect();
(logs, cwes)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment