diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123.java
index 5afc1d9..8b17e25 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123.java
@@ -1,5 +1,6 @@
 /*
  * Copyright 2017 Huawei Technologies Co., Ltd.
+ * Modified 2020 Nokia.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,6 +21,15 @@
 import org.onap.cvc.csar.CSARArchive;
 import org.onap.cvc.csar.CSARArchive.CSARErrorEntryMissing;
 import org.onap.cvc.csar.cc.VTPValidateCSARBase;
+import org.onap.cvc.csar.parser.SourcesParser;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.List;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
 
 @OnapCommandSchema(schema = "vtp-validate-csar-r01123.yaml")
 public class VTPValidateCSARR01123 extends VTPValidateCSARBase {
@@ -27,17 +37,66 @@
     public static class CSARErrorEntryVNFProviderDetailsNotFound extends CSARErrorEntryMissing {
         public CSARErrorEntryVNFProviderDetailsNotFound() {
             super("VNF Vendor details",
-                    CSARArchive.TOSCA_METADATA + " or " + CSARArchive.TOSCA_METADATA_TOSCA_META_ENTRY_DEFINITIONS + " file");
+                CSARArchive.TOSCA_METADATA + " or " + CSARArchive.TOSCA_METADATA_TOSCA_META_ENTRY_DEFINITIONS + " file");
             this.setCode("0x1000");
         }
     }
 
+    public static class CSARErrorNotAllFilesLocatedInCSARWhereListedInManifest extends CSARErrorEntryMissing {
+        CSARErrorNotAllFilesLocatedInCSARWhereListedInManifest(List<String> fileInCsarThatAreNotLocatedInManifest) {
+            super("Source",
+                CSARArchive.TOSCA_METADATA);
+            this.setCode("0x1000");
+            this.message = "files: "
+                + String.join(", ", fileInCsarThatAreNotLocatedInManifest)
+                + " are located in CSAR, but are not located in Manifest as Source";
+        }
+    }
+
     @Override
     protected void validateCSAR(CSARArchive csar) throws Exception {
         if (csar.getVendorName() == null ||
-                csar.getVersion() == null) {
+            csar.getVersion() == null) {
             errors.add(new CSARErrorEntryVNFProviderDetailsNotFound());
         }
+
+        Path rootFolder = csar.getWorkspace().getRootFolder()
+            .orElseThrow(() -> new IOException("Couldn't find CSAR root catalog"));
+        List<String> filesInCsar = getAllFilesInDirectory(rootFolder);
+        List<String> sourcesInManifest = getAllFilesFromManifestSources(csar.getManifest());
+
+        if (filesInCsar.size() != sourcesInManifest.size() || !sourcesInManifest.containsAll(filesInCsar)) {
+            filesInCsar.removeAll(sourcesInManifest);
+            errors.add(new VTPValidateCSARR01123.CSARErrorNotAllFilesLocatedInCSARWhereListedInManifest(filesInCsar));
+        }
+    }
+
+    private List<String> getAllFilesFromManifestSources(CSARArchive.Manifest manifest) {
+        return manifest.getSources()
+            .stream()
+            .map(SourcesParser.Source::getValue)
+            .filter(filterOutManifestFile())
+            .collect(Collectors.toList());
+    }
+
+    private List<String> getAllFilesInDirectory(Path rootPath) throws IOException {
+        try (Stream<Path> paths = Files.walk(rootPath, Integer.MAX_VALUE)) {
+            return paths
+                .filter(filterOutDirectories())
+                .map(rootPath::relativize)
+                .map(String::valueOf)
+                .filter(filterOutManifestFile())
+                .collect(Collectors.toList());
+        }
+    }
+
+    private Predicate<Path> filterOutDirectories() {
+        return path -> !Files.isDirectory(path);
+    }
+
+
+    private Predicate<String> filterOutManifestFile() {
+        return path -> !path.endsWith(".mf");
     }
 
     @Override
diff --git a/csarvalidation/src/main/resources/open-cli-schema/sol004/vtp-validate-csar-r01123.yaml b/csarvalidation/src/main/resources/open-cli-schema/sol004/vtp-validate-csar-r01123.yaml
index 59bb955..577b2ca 100644
--- a/csarvalidation/src/main/resources/open-cli-schema/sol004/vtp-validate-csar-r01123.yaml
+++ b/csarvalidation/src/main/resources/open-cli-schema/sol004/vtp-validate-csar-r01123.yaml
@@ -17,13 +17,13 @@
 name: csar-validate-r01123
 
 description: |
-  The VNF package Manifest file MUST contain: VNF package meta-data, a list of all artifacts
-  (both internal and external) entry’s including their respected URI’s, an algorithm to calculate
-  a digest and a digest result calculated on the content of each artifacts, as specified in
-  ETSI GS NFV-SOL004. The VNF Package MUST include VNF Identification Data to uniquely
-  identify the resource for a given VNF provider. The identification data must include:
-  an identifier for the VNF, the name of the VNF as was given by the VNF provider, VNF
-  description, VNF provider, and version.
+  The VNF or PNF CSAR package Manifest file MUST contain: VNF or PNF package meta-data,
+  a list of all artifacts (both internal and external) entry’s including their respected URI’s,
+  an algorithm to calculate a digest and a digest result calculated on the content of each artifacts,
+  as specified in ETSI GS NFV-SOL004. The VNF or PNF Package MUST include VNF or PNF Identification Data to uniquely
+  identify the resource for a given provider. The identification data must include:
+  an identifier for the VNF or PNF, the name of the VNF or PNF as was given by the provider,
+  description, provider and version.
 
 info:
   product: onap-dublin
@@ -38,6 +38,13 @@
       short_option: b
       type: binary
       is_optional: false
+    - name: pnf
+      description: CSAR file contains PNF
+      long_option: pnf
+      short_option: p
+      type: bool
+      is_optional: true
+      default_value: false
 
 results:
     direction: landscape
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123IntegrationTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123IntegrationTest.java
new file mode 100644
index 0000000..8f6ebbe
--- /dev/null
+++ b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR01123IntegrationTest.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2020 Nokia
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.onap.cvc.csar.cc.sol004;
+
+import org.assertj.core.api.Condition;
+import org.assertj.core.api.HamcrestCondition;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.cvc.csar.CSARArchive;
+
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.hamcrest.CoreMatchers.allOf;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.onap.cvc.csar.cc.sol004.IntegrationTestUtils.configureTestCase;
+import static org.onap.cvc.csar.cc.sol004.IntegrationTestUtils.convertToMessagesList;
+
+public class VTPValidateCSARR01123IntegrationTest {
+
+    private static final boolean IS_PNF = true;
+    private static final String TEST_CSAR_DIRECTORY = "pnf/r01123/";
+
+    private VTPValidateCSARR01123 testCase;
+
+    @Before
+    public void setUp() {
+        testCase = new VTPValidateCSARR01123();
+    }
+
+    @Test
+    public void shouldReturnProperRequestNumber() {
+        assertThat(testCase.getVnfReqsNo()).isEqualTo("R01123");
+    }
+
+    @Test
+    public void shouldReportThatVendorNameAndVersionAreMissing() throws Exception {
+        // given
+        configureTestCase(testCase, TEST_CSAR_DIRECTORY + "csar-option1-invalid-noVendor.csar", "vtp-validate-csar-r01123.yaml", IS_PNF);
+
+        // when
+        testCase.execute();
+
+        // then
+        List<CSARArchive.CSARError> errors = testCase.getErrors();
+        assertThat(errors.size()).isEqualTo(3);
+        assertThat(convertToMessagesList(errors)).contains(
+            "Missing. Entry [TOSCA-Meta-File-Version]",
+            "Missing. Entry [VNF Vendor details]",
+            "Missing. Entry [Created-by]"
+        );
+    }
+
+    @Test
+    public void shouldReportThatFileIsNotPresentInSources() throws Exception {
+        // given
+        configureTestCase(testCase, TEST_CSAR_DIRECTORY + "csar-option1-invalid-noFileInManifest.csar", "vtp-validate-csar-r01123.yaml", IS_PNF);
+
+        // when
+        testCase.execute();
+
+        Condition<String> containingMissingFiles = new HamcrestCondition<>(allOf(
+            containsString("TOSCA-Metadata/TOSCA.meta"),
+            containsString("Artifacts/Deployment/Yang_module/yang-module2.yang"),
+            containsString("Artifacts/Deployment/Yang_module/yang-module1.yang"),
+            containsString("Artifacts/Informational/user_guide.txt"),
+            containsString("Artifacts/sample-pnf.cert")
+        ));
+
+        // then
+        List<CSARArchive.CSARError> errors = testCase.getErrors();
+        assertThat(errors.size()).isEqualTo(1);
+        assertThat(convertToMessagesList(errors)).haveExactly(1, containingMissingFiles);
+    }
+
+    @Test
+    public void shouldReportThatVendorNameIsMissingAndThatFileIsNotPresentInSource() throws Exception {
+        // given
+        configureTestCase(testCase, TEST_CSAR_DIRECTORY + "csar-option1-invalid-noVendor-noFileInManifest.csar", "vtp-validate-csar-r01123.yaml", IS_PNF);
+
+        // when
+        testCase.execute();
+
+        Condition<String> containingMissingFiles = new HamcrestCondition<>(allOf(
+            containsString("Artifacts/Informational/user_guide.txt")
+        ));
+
+        // then
+        List<CSARArchive.CSARError> errors = testCase.getErrors();
+        assertThat(errors.size()).isEqualTo(3);
+        assertThat(convertToMessagesList(errors)).contains(
+            "Missing. Entry [VNF Vendor details]",
+            "Missing. Entry [Created-by]"
+        );
+        assertThat(convertToMessagesList(errors)).haveExactly(1, containingMissingFiles);
+    }
+
+    @Test
+    public void shouldNotReportAnyErrorWhenAllFilesPresentInCsarArePresentInSources() throws Exception {
+        // given
+        configureTestCase(testCase, TEST_CSAR_DIRECTORY + "csar-option1-valid.csar", "vtp-validate-csar-r01123.yaml", IS_PNF);
+
+        // when
+        testCase.execute();
+
+        // then
+        List<CSARArchive.CSARError> errors = testCase.getErrors();
+        assertThat(errors.size()).isEqualTo(0);
+    }
+
+}
diff --git a/csarvalidation/src/test/resources/pnf/r01123/csar-option1-invalid-noFileInManifest.csar b/csarvalidation/src/test/resources/pnf/r01123/csar-option1-invalid-noFileInManifest.csar
new file mode 100644
index 0000000..26e3971
--- /dev/null
+++ b/csarvalidation/src/test/resources/pnf/r01123/csar-option1-invalid-noFileInManifest.csar
Binary files differ
diff --git a/csarvalidation/src/test/resources/pnf/r01123/csar-option1-invalid-noVendor-noFileInManifest.csar b/csarvalidation/src/test/resources/pnf/r01123/csar-option1-invalid-noVendor-noFileInManifest.csar
new file mode 100644
index 0000000..b9136c8
--- /dev/null
+++ b/csarvalidation/src/test/resources/pnf/r01123/csar-option1-invalid-noVendor-noFileInManifest.csar
Binary files differ
diff --git a/csarvalidation/src/test/resources/pnf/r01123/csar-option1-invalid-noVendor.csar b/csarvalidation/src/test/resources/pnf/r01123/csar-option1-invalid-noVendor.csar
new file mode 100644
index 0000000..11bddbb
--- /dev/null
+++ b/csarvalidation/src/test/resources/pnf/r01123/csar-option1-invalid-noVendor.csar
Binary files differ
diff --git a/csarvalidation/src/test/resources/pnf/r01123/csar-option1-valid.csar b/csarvalidation/src/test/resources/pnf/r01123/csar-option1-valid.csar
new file mode 100644
index 0000000..62b18eb
--- /dev/null
+++ b/csarvalidation/src/test/resources/pnf/r01123/csar-option1-valid.csar
Binary files differ
