Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI specimin integration #330

Closed
wants to merge 0 commits into from
Closed

Conversation

NiharikaJamble
Copy link
Collaborator

This change will run a workflow to run accuracy check for changes made in specimin via a pull request or commit on main branch of project specimin

Copy link
Collaborator

@kelloggm kelloggm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking over the log, I have one concern:

  • from here, I see that there is a syntax error in your call to bc. That suggests that the result of this test is only correct coincidentally.

- name: Debug - Show Current Branch
run: |
set -ex
echo "Current branch: $(git branch --show-current)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step (and other debug steps) should be removed before we merge this script.

- name: Clone ASHE Project
run: |
set -ex
git clone https://github.com/njit-jerse/ASHE_Automated-Software-Hardening-for-Entrypoints ASHE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than cloning the ASHE repo directly, this should use the git-clone-related program available here: https://github.com/plume-lib/git-scripts/blob/main/git-clone-related instead. That program permits CI to work correctly when a developer needs to make changes that must be coordinated across multiple repositories.

set -ex
git clone https://github.com/njit-jerse/ASHE_Automated-Software-Hardening-for-Entrypoints ASHE

- name: Create ASHE Clone SPACE Directory
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this "Clone SPACE Directory"? It seems superfluous to me.

chmod +w ASHE/src/main/resources/config.properties
ls -l ASHE/src/main/resources/config.properties

- name: Update ASHE Config File to update SPECIMIN path
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Specimin" is a name, not an acronym. So, it should not be styled as "SPECIMIN", since it doesn't stand for anything.

set -ex
current_accuracy=$(cat current_run_accuracy_percentage.txt)
echo "Current accuracy: $current_accuracy"
previous_run_accuracy=${{ secrets.LATEST_SPECIMIN_EVAL_PERCENTAGE }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned that this is a single global variable for all pull requests. Consider the following scenario in the future:

  • on the main branch, the last CI run produced 90% accuracy
  • from the feature-1 branch, developer A opens a PR with 85% accuracy. This CI task fails, because 85 < 90 (all good so far!)
  • from the feature-2 branch, developer B opens another PR with 87% accuracy. Will this CI task pass? I think it will, because the latest run will be the run of feature-1 that failed with 85% accuracy, and 87 > 85.

So, I think that this really needs to only be updated if the current branch is main: otherwise, there could be confusion between PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants