Skip to content
kgal edited this page May 18, 2017 · 208 revisions

Protection Profile Development Getting Started

Environment Preparation

Requirements

  • A git client
  • An XML editor (preferably one that can validate against Relax NG schemas)
  • Optional (but highly recommended)
    • The make utility
    • An XSL Engine
    • The hunspell spellchecker

UNIX-derivative distribution

Creating the right environment on a UNIX-derivative platform, such as macOS, Solaris, or Linux-based, is relatively straight-forward---you just need to install the packages that correspond to the requirements listed above. For example, on a yum-based distribution, you would simply enter the following command: sudo yum install git make emacs hunspell xsltproc

Windows 10

There are a couple of options for installing the necessary requirements on a Windows 10 platform, but the easiest is probably using the Linux subsystem. Installation instructions are described here. Once this is successfully installed you need to follow the instructions listed above in the UNIX-derivative distribution section.

Adding to an Existing Project

Cloning

To edit an existing product, you must first clone the project locally. Click the green clone button on the desired project's page, as illustrated in the picture below. Clone Button Picture This should open a small window with the git URL (also illustrated in the picture). Use this to clone your project. If using the command line git client, type

git clone --recursive $GIT_URL

where $GIT_URL is the value noted above, and not the literal string. For example, for the File Encryption PP, you'd run the following command:

git clone --recursive https://github.com/commoncriteria/fileencryption.git

After cloning the project, you should be able to build it (hopefully). Typing make should build the HTML documents. The HTML documents and should now be in the output directory and should be viewed with a JavaScript-enabled browser.

Editing

Tweaking Make values

Common Make Targets

  • empty : Builds all HTML documents
  • clean : Deletes all HTML documents
  • spellcheck : Runs hunspell spellchecker
  • git-safe-push : Pulls changes from the master copy (github). Builds document and if successful pushes your changes to master.

Starting a New Project From Scratch

Cloning the Skeleton

  1. To make a new protection profile create a new repo on the git server (i.e. github.com), probably through the web interface. Note the value of its git URL which is displayed when you click the Clone or Download button on the upper left. We refer to this value as $NEW_REPO_GIT_URL.

  2. Run the following script (with the appropriate value for $NEW_REPO_GIT_URL).

git clone --bare https://github.com/commoncriteria/pp-template.git
# Make a bare clone of the repository

cd pp-template.git
git push --mirror $NEW_REPO_GIT_URL
# Mirror-push to the new repository

cd ..
rm -rf pp-template.git
# Remove our temporary local repository
  1. Do a full clone of your new project

  2. Rename the input file, currently named, input/pp-template.xml to the name of the project with xml added to it; for example, operatingsystem and application have operatingsystem.xml and application.xml input files respectively. If something was the project name it would be,

git mv input/pp-template.xml input/something.xml
  1. And start editing. The template project contains some boilerplate text. Besides adding the content, several values that are project specific are called out with the QQQQ character sequence.

Examples

If you get into trouble, it might be helpful to view other examples such as:

References

Clone this wiki locally